diff --git a/docker-compose-production.yml b/docker-compose-production.yml new file mode 100644 index 0000000..2f229e0 --- /dev/null +++ b/docker-compose-production.yml @@ -0,0 +1,61 @@ +version: "2" + +volumes: + database: + driver: local + website: + +services: + # Build the frontend with node into a Docker volume + # This container does nothing useful beside providing an + # assets container to the nginx service + frontend: + image: villas-web + volumes: + - website:/usr/src/app/build + + nginx: + image: nginx:stable-alpine + ports: + - "80:80" + - "443:443" + volumes: + - website:/www + - ./etc/nginx:/etc/nginx/conf.d/ + + # The VILLASweb backend + backend: + image: villas-backend + environment: + - NODE_ENV=production + restart: always + + # The MongoDB database for the VILLASweb backend + database: + image: mongo:latest + user: mongodb + volumes: + - database:/data/db + restart: always + user: mongodb + + # AMQP broker for VILLAScontroller +# broker: +# image: rabbitmq:management +# environment: +# RABBITMQ_DEFAULT_USER: "villas" +# RABBITMQ_DEFAULT_PASS: "s3c0sim4!" +# ports: +# - "8080:15672" +# - "5672:5672" +# networks: +# villas: + + # VILLASnode, the gateway between UDP and WebSocket traffic + node: + image: villas/node + privileged: true + restart: always + command: node /etc/villas/node/websocket-demo.conf + volumes: + - ./etc/node:/etc/villas/node/