mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
[deploy] new entrypoint design
This commit is contained in:
parent
c6fe84d730
commit
a803b26472
@ -44,6 +44,10 @@ COPY --from=build /go/src/app /app
|
|||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
USER guest
|
USER guest
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 CMD curl -fs http://localhost:3000/health
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||||
|
CMD curl -fs http://localhost:3000/health
|
||||||
|
|
||||||
|
CMD [ "/app/app" ]
|
||||||
|
|||||||
@ -4,7 +4,10 @@
|
|||||||
# Immediately exit if any command has a non-zero exit status.
|
# Immediately exit if any command has a non-zero exit status.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Execute any pre-startup scripts or tasks.
|
# Execute DB migrations only when the main application is about to run
|
||||||
/app/app db:migrate up
|
if [ "${1:-}" = "/app/app" ]; then
|
||||||
|
/app/app db:migrate up
|
||||||
|
fi
|
||||||
|
|
||||||
exec /app/app "$@"
|
# Execute the main application
|
||||||
|
exec "$@"
|
||||||
Loading…
x
Reference in New Issue
Block a user