Commit 16c55e613a1c3e9e62404602b9bb7d67e00110aa
1 parent
74f41194
Exists in
master
Continue duelling with docker and gateways.
En garde!
Showing
3 changed files
with
19 additions
and
3 deletions
Show diff stats
Dockerfile
1 | -FROM python:2.7 | 1 | +#FROM python:2.7 |
2 | +FROM tiangolo/uwsgi-nginx-flask:python2.7 | ||
2 | ADD . /app | 3 | ADD . /app |
3 | WORKDIR /app | 4 | WORKDIR /app |
4 | RUN pip install -r requirements.txt | 5 | RUN pip install -r requirements.txt |
@@ -6,4 +7,4 @@ ENV FLASK_APP "flaskr" | @@ -6,4 +7,4 @@ ENV FLASK_APP "flaskr" | ||
6 | ENV FLASK_ENV "production" | 7 | ENV FLASK_ENV "production" |
7 | ENV FLASK_RUN_EXTRA_FILES "content.yml" | 8 | ENV FLASK_RUN_EXTRA_FILES "content.yml" |
8 | #CMD flask run | 9 | #CMD flask run |
9 | -CMD python web/wsgi.py | ||
10 | \ No newline at end of file | 10 | \ No newline at end of file |
11 | +#CMD python web/wsgi.py | ||
11 | \ No newline at end of file | 12 | \ No newline at end of file |
docker-compose.yml
@@ -13,9 +13,10 @@ services: | @@ -13,9 +13,10 @@ services: | ||
13 | # - "5000:5000" | 13 | # - "5000:5000" |
14 | 14 | ||
15 | environment: | 15 | environment: |
16 | +# DEBUG: true | ||
16 | # Config for server's nginx-reverse-proxy container | 17 | # Config for server's nginx-reverse-proxy container |
17 | LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com | 18 | LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com |
18 | - LETSENCRYPT_EMAIL: antoine@ljbac.com | 19 | + LETSENCRYPT_EMAIL: antoine@goutenoir.com |
19 | VIRTUAL_HOST: travel-footprint-calculator.apps.goutenoir.com | 20 | VIRTUAL_HOST: travel-footprint-calculator.apps.goutenoir.com |
20 | # 80 is the default port | 21 | # 80 is the default port |
21 | VIRTUAL_PORT: 80 | 22 | VIRTUAL_PORT: 80 |
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +import os | ||
2 | +import sys | ||
3 | + | ||
4 | +PROJECT_ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) | ||
5 | + | ||
6 | +sys.path.append(PROJECT_ROOT_DIR) | ||
7 | + | ||
8 | +# Only now can we import locals | ||
9 | +from flaskr import create_app | ||
10 | + | ||
11 | +app = create_app('flaskr.settings.ProductionConfig') | ||
12 | + | ||
13 | +if __name__ == "__main__": | ||
14 | + app.run(host='0.0.0.0') |