Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add dockerfile and deployment docs #33

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM owncloudci/nodejs:20 AS stage

WORKDIR /extension

COPY . .
RUN pnpm install
RUN pnpm build

FROM alpine:3.20

WORKDIR /app

COPY --from=stage /extension/dist ./
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,31 @@ This is an extension for [ownCloud web](https://github.com/owncloud/web) for vie

## Installation

1. Download the zip file from the [releases page](https://github.com/saw-jan/web-app-3dmodel-viewer/releases)
1. Download the zip file from the [releases page](https://github.com/saw-jan/web-app-3dmodel-viewer/releases)
2. Extract the zip file to the apps directory of the oCIS server, [which is set using the `WEB_ASSET_APPS_PATH` environment variable](https://doc.owncloud.com/ocis/next/deployment/webui/webui-customisation.html#extend-web-ui-with-apps)

### App Installation With [oCIS Deployment](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full)

1. Copy [`deployments/3dviewer.yaml`](./deployments/3dviewer.yaml) into the [web_extensions](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full/web_extensions)
subfolder of oCIS full deployment example.
2. Add `MODEL_3D_VIEWER=:web_extensions/3dviewer.yaml` to the `## oCIS Web Extensions ##` section of the `.env` file of your installation (file is located in [deployments/examples/ocis_full](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full)) and append it to the `COMPOSE_FILE` variable.

```env
## oCIS Web Extensions ##
MODEL_3D_VIEWER=:web_extensions/3dviewer.yaml
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name cannot start with a number


COMPOSE_FILE=docker-compose.yml${...}${3D_VIEWER:-}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saw-jan variable name needs to be updated there too

```

3. Run `docker compose up` to run oCIS with the extensions

oCIS URL: [ocis.owncloud.test](https://ocis.owncloud.test)

See the [docs](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_full) for more information.

## Build and Run for development

For building and running the app from the code base, follow these steps:
For building and running the app from the code base, follow these steps:

1. Install the dependencies

Expand Down
13 changes: 13 additions & 0 deletions deployments/3dviewer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
ocis:
depends_on:
3dviewer:
condition: service_completed_successfully

3dviewer:
image: sawjan/3dviewer:0.1.0
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: ['-c', 'cp -R /app/* /apps']
Loading