Compare commits

...

3 Commits

Author SHA1 Message Date
Jonas Plum
9285aec468 fix: docker entrypoint permissions (#1114) 2024-11-06 02:12:09 +01:00
Jonas Plum
97d0cd3428 fix: goreleaser docker (#1113) 2024-11-06 02:02:47 +01:00
Jonas Plum
baba5b7a45 feat: docker entrypoint with environment variables (#1112) 2024-11-06 01:52:48 +01:00
3 changed files with 22 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ dockers:
- "ghcr.io/securitybrewery/catalyst:main"
- "{{if not .Prerelease}}ghcr.io/securitybrewery/catalyst:latest{{end}}"
- "ghcr.io/securitybrewery/catalyst:{{.Tag}}"
extra_files:
- docker/entrypoint.sh
archives:
- format: tar.gz

View File

@@ -11,4 +11,8 @@ VOLUME /usr/local/bin/catalyst_data
HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
CMD ["/usr/local/bin/catalyst", "serve", "--http", "0.0.0.0:8080"]
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]

15
docker/entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Set the flags
FLAGS=""
if [ -n "$CATALYST_FLAGS" ]; then
FLAGS="$CATALYST_FLAGS"
fi
# Set the app url
APP_URL=""
if [ -n "$CATALYST_APP_URL" ]; then
APP_URL="$CATALYST_APP_URL"
fi
/usr/local/bin/catalyst serve --http 0.0.0.0:8080 --flags "$FLAGS" --app-url "$APP_URL"