Skip to content

Commit

Permalink
ci: update Docker entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
helen-m-lin committed Oct 17, 2024
1 parent d2fef42 commit 641db78
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ RUN pip install . --no-cache-dir
EXPOSE 8000


ENTRYPOINT ["panel", "serve", "/app/src/aind_metadata_viz/app.py", "--static-dirs", "images=src/aind_metadata_viz/images", "--port", "8000", "--allow-websocket-origin", "0.0.0.0:8000", "--keep-alive", "10000"]
ENTRYPOINT ["sh", "-c", "panel serve /app/src/aind_metadata_viz/app.py --static-dirs images=src/aind_metadata_viz/images --address 0.0.0.0 --port 8000 --allow-websocket-origin ${ALLOW_WEBSOCKET_ORIGIN} --keep-alive 10000"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,17 @@ nohup panel serve ./src/aind_metadata_viz/app.py --allow-websocket-origin=10.128
```

The process (should) auto-restart on reboot. See `crontab -e`

## CI/CD
There is a `Dockerfile` which includes the entrypoint to launch the app.

### Local dev
1. Build the Docker image locally and run a Docker container:
```sh
docker build -t aind-metadata-viz .
docker run -e ALLOW_WEBSOCKET_ORIGIN=localhost:8000 -p 8000:8000 aind-metadata-viz
```
2. Navigate to 'localhost:8000` to view the app.

### Dev
1. On pushes to the `dev` branch, a GitHub Action will run to publish a Docker image to `ghcr.io/allenneuraldynamics/aind-metadata-viz:dev`.

0 comments on commit 641db78

Please sign in to comment.