-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
31 lines (29 loc) · 1.02 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
version: '3.7'
services:
reverse-proxy:
image: traefik:v1.7 # The official Traefik docker image
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
ports:
- "80:80" # The HTTP port
# - "8080:8080" # The Web UI (enabled by --api)
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
server:
build:
context: ./server
labels:
- "traefik.frontend.rule=Host:${HOST:-docker.localhost}"
- "traefik.port=3000"
command: 'npm run dev'
env_file:
- .env
volumes:
- /var/run/docker.sock:/var/run/docker.sock # connect docker to the host machine docker thread
- ${DOCKER_EXE-/usr/local/bin/docker}:/usr/local/bin/docker # give the container access to docker
- /usr/src/app/node_modules
- ./server:/usr/src/app
rservice:
image: heymp/r-service
labels:
- "traefik.frontend.rule=Host:r-service.${HOST:-docker.localhost}"
- "traefik.port=3000"