diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..605fa24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:19.10 +WORKDIR /srv +COPY requirements.txt . +RUN apt-get update && apt-get install python3-pip -y +RUN python3 -m pip install -r requirements.txt +COPY wowstash wowstash/ +COPY bin/ bin/ +EXPOSE 4001 +CMD ["/srv/bin/prod-container"] diff --git a/bin/prod-container b/bin/prod-container new file mode 100755 index 0000000..4bd3aaa --- /dev/null +++ b/bin/prod-container @@ -0,0 +1,8 @@ +#!/bin/bash + +source .venv/bin/activate +export FLASK_APP=wowstash/app.py +export FLASK_SECRETS=config.py +export FLASK_DEBUG=0 +export FLASK_ENV=production +gunicorn --bind 0.0.0.0:4001 "wowstash.app:app"