diff --git a/source/Dockerfile b/source/Dockerfile index a6c5071..d9f6533 100644 --- a/source/Dockerfile +++ b/source/Dockerfile @@ -26,6 +26,7 @@ RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-locati # Copy the source code to the working directory COPY source /srv/flask_app +RUN chmod +x run.sh # Run the app -CMD ["python", "bot.py", "&", "python", "daily_challenge.py"] \ No newline at end of file +CMD ./run.sh \ No newline at end of file diff --git a/source/run.sh b/source/run.sh new file mode 100644 index 0000000..4da007a --- /dev/null +++ b/source/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Start the first process +python bot.py & + +# Start the second process +python daily_challenge.py & + +# Wait for any process to exit +wait -n + +# Exit with status of process that exited first +exit $?