-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (48 loc) · 1.18 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
50
51
52
53
version: "3.3"
services:
traefik:
image: "traefik:v2.9"
container_name: "traefik"
# command:
#- "--log.level=DEBUG"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./traefik.yaml:/traefik.yaml
restart: always
service-1:
build: .
labels:
- "traefik.enable=true"
- "traefik.http.routers.my-service.rule=Host(`localhost`)"
- "traefik.http.routers.my-service.entrypoints=web"
- "traefik.http.services.my-service.loadbalancer.server.port=5577"
environment:
- APP_NAME=my-service-1
- PORT=5577
ports:
- "5577:5577"
service-2:
build: .
labels:
- "traefik.enable=true"
- "traefik.http.routers.my-service.rule=Host(`localhost`)"
- "traefik.http.routers.my-service.entrypoints=web"
- "traefik.http.services.my-service.loadbalancer.server.port=5578"
environment:
- APP_NAME=my-service-2
- PORT=5578
ports:
- "5578:5578"
mongodb:
container_name: mongodb
image: mongo:4.4
volumes:
- mongodb:/data/db
ports:
- "27017:27017"
command: mongod
volumes:
mongodb: {}