-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
126 lines (116 loc) · 2.82 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
networks:
shared-network:
driver: bridge
services:
# This is the core CRUD ToDo based service.
# todo-service:
# container_name: todo-service
# networks:
# - shared-network
# build:
# context: todo-service
# dockerfile: Dockerfile
# ports:
# - 8080:8080 # CRUD API
# environment:
# - SPRING_PROFILES_ACTIVE=docker
# depends_on:
# - mongodb
# - zipkin
# This is the UI for TOdo
# todo-ui:
# container_name: todo-ui
# networks:
# - shared-network
# build:
# context: frontend
# dockerfile: Dockerfile
# ports:
# - 4200:4200
# environment:
# - SPRING_PROFILES_ACTIVE=docker
# This starts a local MongoDB.
mongodb:
container_name: mongodb
networks:
- shared-network
image: mongo
environment:
- MONGO_INITDB_ROOT_DATABASE=todoapp
# - MONGO_INITDB_ROOT_USERNAME=admin
# - MONGO_INITDB_ROOT_PASSWORD=admin
volumes:
- /app/mongo:/data/db
ports:
- 27017:27017
# user-service:
# container_name: user-service
# networks:
# - shared-network
# build:
# context: user-service
# dockerfile: Dockerfile
# ports:
# - 8081:8081 # CRUD API
# environment:
# - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/users
# - SPRING_DATASOURCE_USERNAME=admin
# - SPRING_DATASOURCE_PASSWORD=admin
# - SPRING_PROFILES_ACTIVE=docker
# depends_on:
# - postgres
# - zipkin
# notification:
# container_name: notification
# networks:
# - shared-network
# build:
# context: user-service
# dockerfile: Dockerfile
# ports:
# - 8082:8082 # CRUD API
# environment:
# - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/notification
# - SPRING_DATASOURCE_USERNAME=admin
# - SPRING_DATASOURCE_PASSWORD=admin
# - SPRING_JPA_HIBERNATE_DDL_AUTO=update
# - SPRING_PROFILES_ACTIVE=docker
# depends_on:
# - postgres
# - zipkin
# - rabbitmq
postgres:
container_name: postgres
image: postgres
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
APP_DB_USER: docker
APP_DB_PASS: docker
USER_DB: users
NOTIFICATION_DB: notification
volumes:
- ./initdb/notification.sql:/docker-entrypoint-initdb.d/notification.sql
- ./initdb/users.sql:/docker-entrypoint-initdb.d/users.sql
ports:
- "5432:5432"
networks:
- shared-network
restart: unless-stopped
rabbitmq:
image: rabbitmq:3.9.11-management-alpine
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
networks:
- shared-network
zipkin:
image: openzipkin/zipkin
container_name: zipkin
ports:
- "9411:9411"
networks:
- shared-network
volumes:
postgres: