docker-compose.yml 1.5 KB
# Orchestrate docker containers to host an instance of the project.
# You *could* use this for development.  Don't.
# You *could* use this for production.  Don't.

version: '2.0'
services:
    travel_footprint_calculator:
        container_name: travel_footprint_calculator
        restart: always
        build: .
        volumes:
        - .:/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:
            STATIC_PATH: /app/flaskr/static
            # Config for server's nginx-reverse-proxy container
            LETSENCRYPT_HOST: travel-footprint-calculator.apps.goutenoir.com
            LETSENCRYPT_EMAIL: antoine@goutenoir.com
            VIRTUAL_HOST: travel-footprint-calculator.apps.goutenoir.com
            VIRTUAL_PORT: 80
            ###################################################


    travel_footprint_calculator_mahcron:
        container_name: travel_footprint_calculator_mahcron
        image: jsonfry/curl-cron
        restart: always
        environment:
            # https is important because all you'll get from http is a 301 ;)
            OPTIONS: "https://travel-footprint-calculator.apps.goutenoir.com/compute"
            CRON_SCHEDULE: "*/3 * * * *"


# Tip from https://github.com/jwilder/nginx-proxy/issues/1132#issuecomment-392460028
# Create it first: docker network create webproxy
networks:
    default:
        external:
            name: webproxy