ship a container ready setup

This commit is contained in:
lza_menace 2020-09-25 02:10:12 -07:00
parent f5deb8ef41
commit adc44d6e03
2 changed files with 17 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -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"]

8
bin/prod-container Executable file
View File

@ -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"