Blame view

docker-compose.yml 1.61 KB
6ae5c09e   Antoine Goutenoir   Somehow, someday,...
1
2
# Orchestrate docker containers to host an instance of the project.
# You *can* use this for development.  Don't.
b4e0bfc3   Antoine Goutenoir   Make sure CRON re...
3
# You *can* use this for production.  Don't.
6ae5c09e   Antoine Goutenoir   Somehow, someday,...
4

74f41194   Antoine Goutenoir   Sure, why not.
5
version: '2.0'
00580901   Antoine Goutenoir   Add a basic, ugly...
6
services:
3ac85c09   Antoine Goutenoir   Continue tweaking...
7
8
9
    com_goutenoir_apps_travel-footprint-calculator:
        container_name: com_goutenoir_apps_travel-footprint-calculator
        restart: always
00580901   Antoine Goutenoir   Add a basic, ugly...
10
        build: .
00580901   Antoine Goutenoir   Add a basic, ugly...
11
        volumes:
3ac85c09   Antoine Goutenoir   Continue tweaking...
12
13
14
15
16
17
18
19
        - .:/app

        # The server's nginx-reverse-proxy does not like ports.
        # Uncomment this to get it working on localhost for dev.
#        ports:
#        - "5000:5000"

        environment:
6ae5c09e   Antoine Goutenoir   Somehow, someday,...
20
            STATIC_PATH: /app/flaskr/static
3ac85c09   Antoine Goutenoir   Continue tweaking...
21
22
            # Config for server's nginx-reverse-proxy container
            LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com
16c55e61   Antoine Goutenoir   Continue duelling...
23
            LETSENCRYPT_EMAIL: antoine@goutenoir.com
3ac85c09   Antoine Goutenoir   Continue tweaking...
24
25
26
27
28
29
30
31
32
            VIRTUAL_HOST: travel-footprint-calculator.apps.goutenoir.com
            # 80 is the default port
            VIRTUAL_PORT: 80
            ###################################################


    com_goutenoir_apps_travel-footprint-calculator_mahcron:
        container_name: com_goutenoir_apps_travel-footprint-calculator_mahcron
        image: jsonfry/curl-cron
b4e0bfc3   Antoine Goutenoir   Make sure CRON re...
33
        restart: always
3ac85c09   Antoine Goutenoir   Continue tweaking...
34
        environment:
6ae5c09e   Antoine Goutenoir   Somehow, someday,...
35
36
            # https is important because all you'll get from http is a 301 ;)
            OPTIONS: "https://travel-footprint-calculator.apps.goutenoir.com/compute"
5fa64d17   Antoine Goutenoir   Making every shit...
37
            CRON_SCHEDULE: "*/3 * * * *"
6ae5c09e   Antoine Goutenoir   Somehow, someday,...
38

74f41194   Antoine Goutenoir   Sure, why not.
39
40
41
42
43

# Tip from https://github.com/jwilder/nginx-proxy/issues/1132#issuecomment-392460028
# Create it first: docker network create webproxy
networks:
    default:
b4e0bfc3   Antoine Goutenoir   Make sure CRON re...
44
45
        external:
            name: webproxy
74f41194   Antoine Goutenoir   Sure, why not.