-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (55 loc) · 1.43 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
54
55
56
57
58
59
services:
student-service:
build:
context: .
dockerfile: Dockerfile.dev
secrets:
- source: maven_settings
container_name: student-service
volumes:
- .:/app
- ./target:/app/target
environment:
- SPRING_PROFILES_ACTIVE=dev
- SPRING_DEVTOOLS_RESTART_ENABLED=true
ports:
- "8080"
- "35729"
depends_on:
- mongo-db
- redis-cache
networks:
- teachme-network
- proxy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.teachme-student-service.rule=Host(`teachme-student-service.localhost`)"
- "traefik.http.services.teachme-student-service.loadbalancer.server.port=8080"
mongo-db:
image: mongodb/mongodb-community-server:6.0.12-ubi8
environment:
- MONGO_INITDB_ROOT_USERNAME=user
- MONGO_INITDB_ROOT_PASSWORD=pass
ports:
- "27017"
networks:
- teachme-network
- proxy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.teachme-student-service-db.rule=Host(`teachme-student-service.db.localhost`)"
- "traefik.http.services.teachme-student-service-db.loadbalancer.server.port=8080"
redis-cache:
image: redis/redis-stack-server:latest
ports:
- "6379"
networks:
- teachme-network
secrets:
maven_settings:
file: ~/.m2/settings.xml
networks:
teachme-network:
external: true
proxy-network:
external: true