-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.prod.yml
155 lines (144 loc) · 3.18 KB
/
docker-compose.prod.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
version: "3"
services:
frontend:
build:
context: ./frontend
args:
API_URL: "*"
container_name: frontend
volumes:
- build_frontend:/frontend/build
- ./frontend:/frontend/
- ./frontend/node_modules/:/frontend/node_modules
image: run
environment:
- REACT_APP_KAKAO_TOKEN=${REACT_APP_KAKAO_TOKEN}
- REACT_APP_BACKEND_URL=${REACT_APP_BACKEND_URL}
- WDS_SOCKET_PORT=0
- CI=true
stdin_open: true
tty: true
nginx:
build: ./nginx
container_name: nginx
ports:
- 80:80
restart: on-failure
volumes:
- build_frontend:/var/www/frontend
depends_on:
- frontend
networks:
- app-tier
db:
image: postgres
restart: on-failure
container_name: db
ports:
- 5432:5432
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_USER_PASSWORD}
POSTGRES_DB: ${DB_SCHEMA}
volumes:
- postgresql_database:/var/lib/postgresql/data
networks:
- app-tier
backend:
build:
context: ./backend
container_name: backend
ports:
- 8080:8080
environment:
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_SECRET_KEY: ${S3_SECRET_KEY}
DB_USERNAME: ${DB_USERNAME}
DB_SCHEMA: ${DB_SCHEMA}
DB_USER_PASSWORD: ${DB_USER_PASSWORD}
SPRING_PROFILES_ACTIVE: prod
networks:
- app-tier
depends_on:
- db
- kafka
restart: on-failure
tty: true
zookeeper:
image: confluentinc/cp-zookeeper
container_name: zookeeper
environment:
- ZOOKEEPER_CLIENT_PORT=2181
ports:
- 2181:2181
networks:
- app-tier
kafka:
image: confluentinc/cp-kafka
ports:
- 9092:9092
container_name: kafka
restart: on-failure
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: dresses:1:1,ratings:1:1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
networks:
- app-tier
kafdrop:
image: obsidiandynamics/kafdrop:latest
ports:
- 9000:9000
container_name: kafdrop
restart: on-failure
environment:
KAFKA_BROKERCONNECT: kafka:9092
JVM_OPTS: "-Xms32M -Xmx64M"
SERVER_SERVLET_CONTEXTPATH: /
depends_on:
- kafka
networks:
- app-tier
tty: true
ai:
build:
context: ./ai
container_name: ai
restart: on-failure
depends_on:
- kafka
- backend
networks:
- app-tier
tty: true
prometheus:
image: prom/prometheus
container_name: prometheus
restart: on-failure
ports:
- 9090:9090
networks:
- app-tier
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
container_name: grafana
restart: on-failure
ports:
- 3000:3000
networks:
- app-tier
networks:
app-tier:
driver: bridge
volumes:
build_frontend: null
postgresql_database: null