ahbeng/NUSMods

View on GitHub
infra/machine/docker-compose.yml

Summary

Maintainability
Test Coverage
version: '3.7'
services:
  machine-proxy:
    image: traefik:alpine
    ports:
      - '80:80'
      - '443:443'
      - '5678:5678'
    networks:
      - intranet
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./traefik.toml:/traefik.toml
      - ~/data/traefik/acme.json:/acme.json
    environment:
      - CF_API_EMAIL=mods@nusmods.com
      # Global API key. To retrieve it, log into the mods@nusmods.com account,
      # then go to https://dash.cloudflare.com/profile/api-tokens.
      - CF_API_KEY=${CF_API_KEY:?Environment variable CF_API_KEY is missing}
    restart: on-failure

# Create a bridge network called 'intranet',
# which allows communication with other docker-compose setups
networks:
  intranet:
    driver: bridge