mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-02-12 14:32:45 +00:00
signal handling
This commit is contained in:
@@ -8,5 +8,7 @@ COPY . /srv/gateway
|
||||
|
||||
# Ensure run.sh is executable
|
||||
RUN chmod +x /srv/gateway/run.sh
|
||||
WORKDIR /srv/gateway
|
||||
|
||||
ENTRYPOINT ./run.sh
|
||||
# Run the application
|
||||
CMD ["./run.sh"]
|
||||
@@ -9,8 +9,10 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# using 'exec' belows ensures that signals like SIGTERM are passed to the child process
|
||||
# and not the shell script itself (important when running in a container)
|
||||
if [ "$DEV_MODE" = "true" ]; then
|
||||
uvicorn serve:app --host 0.0.0.0 --port 8000 --reload
|
||||
exec uvicorn serve:app --host 0.0.0.0 --port 8000 --reload
|
||||
else
|
||||
uvicorn serve:app --host 0.0.0.0 --port 8000
|
||||
exec uvicorn serve:app --host 0.0.0.0 --port 8000
|
||||
fi
|
||||
Reference in New Issue
Block a user