Commit 6ae5c09e12e4fa91b90eb4203c39385e31025186
1 parent
5fa64d17
Exists in
master
Somehow, someday, docker will make things go faster.
Meanwhile…
Showing
3 changed files
with
10 additions
and
6 deletions
Show diff stats
docker-compose.yml
1 | +# Orchestrate docker containers to host an instance of the project. | ||
2 | +# You *can* use this for development. Don't. | ||
3 | + | ||
1 | version: '2.0' | 4 | version: '2.0' |
2 | services: | 5 | services: |
3 | com_goutenoir_apps_travel-footprint-calculator: | 6 | com_goutenoir_apps_travel-footprint-calculator: |
@@ -13,7 +16,7 @@ services: | @@ -13,7 +16,7 @@ services: | ||
13 | # - "5000:5000" | 16 | # - "5000:5000" |
14 | 17 | ||
15 | environment: | 18 | environment: |
16 | -# DEBUG: true | 19 | + STATIC_PATH: /app/flaskr/static |
17 | # Config for server's nginx-reverse-proxy container | 20 | # Config for server's nginx-reverse-proxy container |
18 | LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com | 21 | LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com |
19 | LETSENCRYPT_EMAIL: antoine@goutenoir.com | 22 | LETSENCRYPT_EMAIL: antoine@goutenoir.com |
@@ -27,11 +30,10 @@ services: | @@ -27,11 +30,10 @@ services: | ||
27 | container_name: com_goutenoir_apps_travel-footprint-calculator_mahcron | 30 | container_name: com_goutenoir_apps_travel-footprint-calculator_mahcron |
28 | image: jsonfry/curl-cron | 31 | image: jsonfry/curl-cron |
29 | environment: | 32 | environment: |
30 | - OPTIONS: travel-footprint-calculator.apps.goutenoir.com/compute | 33 | + # https is important because all you'll get from http is a 301 ;) |
34 | + OPTIONS: "https://travel-footprint-calculator.apps.goutenoir.com/compute" | ||
31 | CRON_SCHEDULE: "*/3 * * * *" | 35 | CRON_SCHEDULE: "*/3 * * * *" |
32 | -# - OPTIONS=localhost/compute | ||
33 | -# - OPTIONS=travel-footprint-calculator.apps.goutenoir.com/compute | ||
34 | -# - CRON_SCHEDULE="*/3 * * * *" | 36 | + |
35 | 37 | ||
36 | # Tip from https://github.com/jwilder/nginx-proxy/issues/1132#issuecomment-392460028 | 38 | # Tip from https://github.com/jwilder/nginx-proxy/issues/1132#issuecomment-392460028 |
37 | # Create it first: docker network create webproxy | 39 | # Create it first: docker network create webproxy |
flaskr/wsgi.py
@@ -12,4 +12,5 @@ from flaskr import create_app | @@ -12,4 +12,5 @@ from flaskr import create_app | ||
12 | app = create_app('flaskr.settings.ProductionConfig') | 12 | app = create_app('flaskr.settings.ProductionConfig') |
13 | 13 | ||
14 | if __name__ == "__main__": | 14 | if __name__ == "__main__": |
15 | + # Pretty sure we're not using that during WSGI. | ||
15 | app.run(host='0.0.0.0', port=80) | 16 | app.run(host='0.0.0.0', port=80) |