diff --git a/Dockerfile.nginx b/Dockerfile.nginx deleted file mode 100644 index bffea40e22b258ea88b3229d3c1486b540881531..0000000000000000000000000000000000000000 --- a/Dockerfile.nginx +++ /dev/null @@ -1,5 +0,0 @@ -FROM nginx:stable-alpine - -COPY etc/nginx/villas.conf /etc/nginx/conf.d/default.conf - -EXPOSE 8080 diff --git a/Dockerfile.node b/Dockerfile.node deleted file mode 100644 index d1c5f4dc0e1d3ac2438defa0733e77a9ce985d88..0000000000000000000000000000000000000000 --- a/Dockerfile.node +++ /dev/null @@ -1,6 +0,0 @@ -FROM villas/node:latest - -COPY etc/node/*.conf /etc/villas/node/ - -EXPOSE 12000-12100/udp -EXPOSE 12000-12100/tcp diff --git a/docker-compose.yml b/docker-compose.yml index 1c4cbbbd27ba303c1435636a40818876882fdd7b..5709006fdf9ce9f344c19d533b7d8094ff7f5940 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,7 @@ services: image: villas/web-frontend build: context: frontend + restart: always # The VILLASweb backend backend: @@ -19,16 +20,29 @@ services: build: context: backend environment: - - NODE_ENV=production - restart: always + NODE_ENV: dotenv + DATABASE_URL: mongodb://database:27017/ + AMQP_ENDPOINT: "amqp://villas:s3c0sim4!@broker/%2F" + LOG_LEVEL: verbose + LOG_FILE: villasweb-backend_log.txt + DEFAULT_ADMIN: 1 volumes: - files:/usr/src/app/public/ + depends_on: + - broker + restart: always # A single reverse proxy for all our services nginx: - build: - context: . - dockerfile: Dockerfile.nginx + image: nginx:stable-alpine + volumes: + - ./etc/nginx/villas.conf:/etc/nginx/conf.d/default.conf + ports: + - 8080:8080 + depends_on: + - backend + - frontend + restart: always # The MongoDB database for the VILLASweb backend database: @@ -36,22 +50,21 @@ services: user: mongodb volumes: - database:/data/db - restart: always user: mongodb + restart: always # VILLASnode, the gateway between UDP and WebSocket traffic node: - build: - context: . - dockerfile: Dockerfile.node + image: villas/node:latest privileged: true - restart: always - command: node /etc/villas/node/websocket-demo.conf + command: node /etc/villas/node/demo.conf volumes: - ./etc/node:/etc/villas/node ports: + - "8081:80" - "12000-12010:12000-12010/udp" - "12000-12010:12000-12010/tcp" + restart: always # Web Interface for MongoDB mongo-express: @@ -60,10 +73,10 @@ services: ME_CONFIG_MONGODB_SERVER: database ME_CONFIG_BASICAUTH_USERNAME: admin ME_CONFIG_BASICAUTH_PASSWORD: mongo-admin + ME_CONFIG_SITE_BASEURL: /mongo-express/ depends_on: - database - ports: - - "8081:8081" + restart: always # AMQP broker for VILLAScontroller broker: @@ -72,8 +85,9 @@ services: RABBITMQ_DEFAULT_USER: "villas" RABBITMQ_DEFAULT_PASS: "s3c0sim4!" ports: - - "8082:15672" + - "8083:15672" - "5672:5672" + restart: always # A VILLAScontroller for creating some dummy simulators controller: @@ -83,3 +97,4 @@ services: command: villas-ctl -b "amqp://villas:s3c0sim4!@broker/%2F" -c /etc/villas/controller/config.json daemon depends_on: - broker + restart: always