diff --git a/Dockerfile b/Dockerfile index 4c182252..26c73d1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ WORKDIR /src RUN pip install flask gunicorn \ && cp cards-jwasham.db cards.db -CMD ["gunicorn", "--bind", " 0.0.0.0:8000", "flash_cards:app"] +COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh + +EXPOSE 8000 +CMD ["/entrypoint.sh"] diff --git a/config.txt b/config.txt index feed657b..d032a3c0 100644 --- a/config.txt +++ b/config.txt @@ -1,3 +1,3 @@ SECRET_KEY='some very long key here' -USERNAME='username-here' -PASSWORD='password-here' +USERNAME='username-test' +PASSWORD='password-test' \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 00000000..05fa542a --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export CARDS_SETTINGS=/src/config.txt +gunicorn --bind 0.0.0.0:8000 flash_cards:app \ No newline at end of file