Skip to content
Snippets Groups Projects
docker-compose-production-cd.yml 1.63 KiB
Newer Older
Nico Vermaas's avatar
Nico Vermaas committed
version: '3.4'
networks:
  ldv_network:
Nico Vermaas's avatar
Nico Vermaas committed
  traefik_proxy:
    external:
      name: traefik_proxy
  default:
    driver: bridge

services:
  ldv-spec-cache:
    image: memcached:1.6.18
    container_name: ldv-spec-cache
    entrypoint:
      - memcached
      - -m 16
    expose:
      - "11211"
    networks:
      - ldv_network
    restart: always

  rabbitmq:
    image: rabbitmq:3-management
    networks:
      - ldv_network
    container_name: ldv-spec-rabbit

  ldv-specification-background:
    container_name: ldv-specification-background
    image: git.astron.nl:5000/astron-sdc/ldv-specification:${LDVSPEC_VERSION:-latest}
    networks:
      - ldv_network
    depends_on:
      - ldv-spec-cache
    environment:
      CELERY_BROKER_URL: amqp://guest@rabbitmq:5672
    env_file:
      - $HOME/shared/ldvspec.env
    command: celery -A ldvspec worker -l INFO
    restart: always

  ldv-specification:
    container_name: ldv-specification
    image: git.astron.nl:5000/astron-sdc/ldv-specification:${LDVSPEC_VERSION:-latest}
Nico Vermaas's avatar
Nico Vermaas committed

Nico Vermaas's avatar
Nico Vermaas committed
    networks:
      - traefik_proxy
      - ldv_network
Nico Vermaas's avatar
Nico Vermaas committed
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.ldv-specification.entryPoints=websecure"
      - "traefik.http.routers.ldv-specification.service=ldv-specification"
      - "traefik.http.routers.ldv-specification.rule=Host(`sdc.astron.nl`) && PathPrefix(`/ldvspec`)"
      - "traefik.http.services.ldv-specification.loadbalancer.server.port=8000"

    depends_on:
      - ldv-spec-cache
    environment:
      CELERY_BROKER_URL: amqp://guest@rabbitmq:5672
Nico Vermaas's avatar
Nico Vermaas committed
    env_file:
    - $HOME/shared/ldvspec.env
Nico Vermaas's avatar
Nico Vermaas committed
    restart: always