2020-04-03 18:31:11 +02:00
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
reverse-proxy:
|
|
|
|
image: traefik:v2.0
|
|
|
|
command: --api.insecure=true --providers.docker
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
# The Web UI (enabled by --api.insecure=true)
|
|
|
|
- "8080:8080"
|
2020-04-14 20:04:55 +02:00
|
|
|
depends_on:
|
|
|
|
- back
|
|
|
|
- front
|
2020-04-03 18:31:11 +02:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
|
|
|
|
front:
|
|
|
|
image: thecodingmachine/nodejs:12
|
|
|
|
environment:
|
2020-04-13 19:40:10 +02:00
|
|
|
DEBUG_MODE: "$DEBUG_MODE"
|
2020-04-03 18:31:11 +02:00
|
|
|
HOST: "0.0.0.0"
|
|
|
|
NODE_ENV: development
|
|
|
|
API_URL: http://api.workadventure.localhost
|
|
|
|
STARTUP_COMMAND_1: yarn install
|
|
|
|
command: yarn run start
|
|
|
|
volumes:
|
|
|
|
- ./front:/usr/src/app
|
|
|
|
labels:
|
2020-06-01 16:05:01 +02:00
|
|
|
- "traefik.http.routers.front.rule=Host(`play.workadventure.localhost`)"
|
2020-04-03 18:31:11 +02:00
|
|
|
- "traefik.http.services.front.loadbalancer.server.port=8080"
|
2020-04-04 04:08:12 +02:00
|
|
|
|
|
|
|
back:
|
|
|
|
image: thecodingmachine/nodejs:12
|
|
|
|
command: yarn dev
|
|
|
|
environment:
|
|
|
|
STARTUP_COMMAND_1: yarn install
|
2020-04-04 14:05:18 +02:00
|
|
|
SECRET_KEY: yourSecretKey
|
2020-04-04 04:08:12 +02:00
|
|
|
volumes:
|
|
|
|
- ./back:/usr/src/app
|
|
|
|
labels:
|
2020-04-04 11:36:18 +02:00
|
|
|
- "traefik.http.routers.back.rule=Host(`api.workadventure.localhost`)"
|
2020-04-04 04:08:12 +02:00
|
|
|
- "traefik.http.services.back.loadbalancer.server.port=8080"
|
2020-06-01 16:05:01 +02:00
|
|
|
|
|
|
|
website:
|
|
|
|
image: thecodingmachine/nodejs:12-apache
|
|
|
|
environment:
|
|
|
|
STARTUP_COMMAND_1: npm install
|
|
|
|
STARTUP_COMMAND_2: npm run watch &
|
|
|
|
APACHE_DOCUMENT_ROOT: dist/
|
|
|
|
volumes:
|
2020-06-04 14:06:50 +02:00
|
|
|
- ./website:/var/www/html
|
2020-06-01 16:05:01 +02:00
|
|
|
labels:
|
|
|
|
- "traefik.http.routers.website.rule=Host(`workadventure.localhost`)"
|
|
|
|
- "traefik.http.services.website.loadbalancer.server.port=80"
|