-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
49 lines (45 loc) · 1.05 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3'
services:
user-service:
build:
context: ./user
image: user-service-flask
environment:
- FLASK_APP=server.py
ports:
- "5000"
networks:
- my-network
labels:
- "traefik.http.routers.user.rule=Host(`user.localhost`)"
payment-service:
build:
context: ./payment
image: payment-service-flask
environment:
- FLASK_APP=server.py
ports:
- "5001"
networks:
- my-network
labels:
- "traefik.http.routers.payment.rule=Host(`payment.localhost`)"
reverse-proxy:
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command: --api.insecure=true --providers.docker
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
networks:
- my-network
depends_on:
- user-service
- payment-service
networks:
my-network:
driver: bridge