-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
167 lines (153 loc) · 4.3 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
version: '3'
services:
# 프론트 컨테이너
front:
container_name: front
image: devtae/front
restart: on-failure
ports:
- "80:80"
networks:
- eureka_network
# 데이터베이스 컨테이너
back-worker-database:
container_name: back-worker-database
image: postgres:14.5
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB_BACK_WORKER}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
TZ: 'Asia/Seoul'
volumes:
- ./back-worker-data:/var/lib/postgresql/data
- ./back-worker-init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- database_network
back-work-database:
container_name: back-work-database
image: postgres:14.5
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB_BACK_WORK}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
TZ: 'Asia/Seoul'
volumes:
- ./back-work-data:/var/lib/postgresql/data
- ./back-work-init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- database_network
# 백엔드 컨테이너
back-eurekaserver:
container_name: back-eurekaserver
image: devtae/back-eurekaserver
restart: on-failure
ports:
- "8761:8761"
networks:
- eureka_network
back-apigateway:
container_name: back-apigateway
image: devtae/back-apigateway
restart: on-failure
ports:
- "9000:9000"
environment:
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE: http://back-eurekaserver:8761/eureka
depends_on:
- back-eurekaserver
networks:
- eureka_network
back-worker:
container_name: back-worker
image: devtae/back-worker
restart: on-failure
ports:
- "9001:9001"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://back-worker-database:5432/back_worker
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE: http://back-eurekaserver:8761/eureka
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411
API_GATEWAY_URL: http://back-apigateway:9000
depends_on:
- back-worker-database
- back-eurekaserver
- back-apigateway
volumes:
- ./logs:/logs
networks:
- eureka_network
- database_network
back-work:
container_name: back-work
image: devtae/back-work
restart: on-failure
ports:
- "9002:9002"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://back-work-database:5432/back_work
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE: http://back-eurekaserver:8761/eureka
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411
API_GATEWAY_URL: http://back-apigateway:9000
depends_on:
- back-work-database
- back-eurekaserver
- back-apigateway
volumes:
- ./logs:/logs
networks:
- eureka_network
- database_network
back-work-added: # msa 복수 인스턴스
container_name: back-work-added
image: devtae/back-work
restart: on-failure
ports:
- "9004:9002"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://back-work-database:5432/back_work
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE: http://back-eurekaserver:8761/eureka
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411
API_GATEWAY_URL: http://back-apigateway:9000
depends_on:
- back-work-database
- back-eurekaserver
- back-apigateway
volumes:
- ./logs:/logs
networks:
- eureka_network
- database_network
back-dashboard:
container_name: back-dashboard
image: devtae/back-dashboard
restart: on-failure
ports:
- "9003:9003"
environment:
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE: http://back-eurekaserver:8761/eureka
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411
API_GATEWAY_URL: http://back-apigateway:9000
depends_on:
- back-eurekaserver
- back-apigateway
volumes:
- ./logs:/logs
networks:
- eureka_network
- database_network
zipkin:
container_name: zipkin
image: openzipkin/zipkin:latest
restart: on-failure
ports:
- "9411:9411"
networks:
- eureka_network
networks:
database_network:
eureka_network: