Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
docker-compose.yml 3.08 KiB
version: "3.2"

volumes:
  database:
    driver: local
  files:
    driver: local

services:
  # The VILLASweb frontend
  frontend:
    image: registry.git.rwth-aachen.de/acs/public/villas/web:demo-v0.1
    build:
      context: frontend
    restart: always

  # The VILLASweb backend
  backend:
    image: registry.git.rwth-aachen.de/acs/public/villas/web-backend:demo-v0.1
    build:
      context: backend
    environment:
      NODE_ENV: dotenv
      DATABASE_URL: mongodb://database:27017/
      AMQP_ENDPOINT: "amqp://villas:s3c0sim4!@broker/%2F"
      LOG_LEVEL: info
      LOG_FILE: villasweb-backend_log.txt
      DEFAULT_ADMIN: "true"
    command: [
      "wait-for", "broker:5672", "--",
      "wait-for", "database:27017", "--",
      "npm", "start"
    ]
    volumes:
      - files:/usr/src/app/public/
    depends_on:
      - broker
      - database
    restart: always

  # A single reverse proxy for all our services
  nginx:
    image: nginx:1.17.4-alpine
    volumes:
     - ./etc/nginx/:/etc/nginx/conf.d/
    ports:
     - 80:80
    depends_on:
     - backend
     - frontend
     - relay
     - doc
    restart: always

  # The MongoDB database for the VILLASweb backend
  database:
    image: mongo:3.4.23
    volumes:
      - database:/data/db
    restart: always

  # VILLASnode, the gateway between UDP and WebSocket traffic
  node:
    image: registry.git.rwth-aachen.de/acs/public/villas/node:demo-v0.1
    privileged: true
    command: node /etc/villas/node/demo.conf
    volumes:
      - ./etc/villas/node:/etc/villas/node
      - ./data:/data
    ports: