docker-compose.yml 1.24 KB
Newer Older
1 2
version: "2"

3 4 5
volumes:
  database:
    driver: local
6
  website:
7

8
services:
9 10 11
  # Build the frontend with node into a Docker volume
  # This container does nothing useful beside providing an
  # assets container to the nginx service
12
  frontend:
Markus Grigull's avatar
Markus Grigull committed
13
    build:
Ricardo Hernandez's avatar
Ricardo Hernandez committed
14
      context: .
15 16
    volumes:
      - website:/usr/src/app/build
17 18

  nginx:
19 20 21
    build:
      context: .
      dockerfile: Dockerfile.nginx
22 23 24
    ports:
      - "80:80"
      - "443:443"
25 26
    volumes:
      - website:/www
27

28
  # The VILLASweb backend
29
  backend:
Steffen Vogel's avatar
Steffen Vogel committed
30
    build: backend
31 32
    environment:
      - NODE_ENV=production
33
    restart: always
34

35
  # The MongoDB database for the VILLASweb backend
36 37
  database:
    image: mongo:latest
38
    user: mongodb
39
    volumes:
40
      - database:/data/db
41
    restart: always
42 43
    user: mongodb

44
  # AMQP broker for VILLAScontroller
45 46 47 48 49 50 51 52 53 54
#  broker:
#    image: rabbitmq:management
#    environment:
#      RABBITMQ_DEFAULT_USER: "villas"
#      RABBITMQ_DEFAULT_PASS: "s3c0sim4!"
#    ports:
#      - "8080:15672"
#      - "5672:5672"
#    networks:
#      villas:
55 56 57

  # VILLASnode, the gateway between UDP and WebSocket traffic
  node:
58 59 60
    build:
      context: .
      dockerfile: Dockerfile.node
61
    privileged: true
62
    restart: always
63
    command: node /etc/villas/node/websocket-demo.conf