Commit 16c55e613a1c3e9e62404602b9bb7d67e00110aa

Authored by Antoine Goutenoir
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 3 ADD . /app
3 4 WORKDIR /app
4 5 RUN pip install -r requirements.txt
... ... @@ -6,4 +7,4 @@ ENV FLASK_APP "flaskr"
6 7 ENV FLASK_ENV "production"
7 8 ENV FLASK_RUN_EXTRA_FILES "content.yml"
8 9 #CMD flask run
9   -CMD python web/wsgi.py
10 10 \ No newline at end of file
  11 +#CMD python web/wsgi.py
11 12 \ No newline at end of file
... ...
docker-compose.yml
... ... @@ -13,9 +13,10 @@ services:
13 13 # - "5000:5000"
14 14  
15 15 environment:
  16 +# DEBUG: true
16 17 # Config for server's nginx-reverse-proxy container
17 18 LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com
18   - LETSENCRYPT_EMAIL: antoine@ljbac.com
  19 + LETSENCRYPT_EMAIL: antoine@goutenoir.com
19 20 VIRTUAL_HOST: travel-footprint-calculator.apps.goutenoir.com
20 21 # 80 is the default port
21 22 VIRTUAL_PORT: 80
... ...
main.py 0 → 100644
... ... @@ -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')
... ...