Skip to content
Open
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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN pip install -r requirements.txt --no-cache-dir

ENV PYTHONPATH "${PYTHONPATH}:/code"
COPY src /code/src
COPY entrypoint_web.sh /code/entrypoint_web.sh

ENTRYPOINT [ "python", "-m", "src.main" ]
ENTRYPOINT ["bash", "entrypoint_web.sh"]

EXPOSE 6200
13 changes: 13 additions & 0 deletions entrypoint_web.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

sigterm_signal() {
echo "SIGTERM signal!"
kill -TERM "$child" 2>/dev/null
}

trap sigterm_signal SIGTERM

python -m src.main "$@" &

child=$!
wait "$child"