-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
163 lines (149 loc) · 3.54 KB
/
docker-compose.yml
File metadata and controls
163 lines (149 loc) · 3.54 KB
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
version: "3"
services:
frontend:
container_name: frontend
build:
context: ./Ladder-Frontend
ports:
- 8080:80
volumes:
- ./Ladder-Frontend/:/Ladder-Frontend
backend:
container_name: backend
build:
context: ./Ladder-Backend
expose:
- 5123
ports:
- 5123:5123
volumes:
- backend:/var/lib/backend/data
environment:
FLASK_DEBUG: 1
depends_on:
- postgres
command: gunicorn -w 1 -b 0.0.0.0:5123 app:app --reload
tty: true
postgres:
container_name: ladderdb
image: postgres:latest
ports:
- 5432:5432
environment:
- POSTGRES_DB=${PG_DB}
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASSWORD}
volumes:
- postgres:/var/lib/postgres
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
ports:
- 8088:80
environment:
- PGADMIN_DEFAULT_EMAIL=${PG_ADMIN_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
- POSTGRES_INITDB_ARGS=--encoding=UTF-8
rabbit:
container_name: rabbitmq
hostname: rabbit
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
environment:
- RABBITMQ_DEFAULT_USER=darling
- RABBITMQ_DEFAULT_PASS=0829
ports:
# 메시지 대기열을 사용하려는 서버의 경우에만 5672필요
- 5672:5672
# management
- 15672:15672
depends_on:
- backend
- ai
celery:
container_name: celery
build:
context: ./Ladder-Backend
dockerfile: Dockerfile
restart: unless-stopped
# env_file:
# - ./settings/.env
depends_on:
- "rabbit"
- "backend"
- "ai"
command: ["celery","-A", "service.image_service", "worker", "--loglevel=info"]
volumes:
- backend:/usr/src/app
ai:
container_name: ai
build:
context: ./Ladder-AI
ports:
- 5555:5555
environment:
FLASK_DEBUG: 1
volumes:
- ai:/var/lib/ai/data
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=90d # 90일보다 오래된 metrics는 삭제
- --storage.tsdb.retention.size=10GB # 10GB를 넘을 시 오래된 metrics 삭제
- --web.console.libraries=/usr/share/prometheus/console_libraries
- --web.console.templates=/use/share/prometheus/consoles
- --web.enable-admin-api
ports:
- 9090:9090
networks:
- promnet
grafana:
container_name: grafana
image: grafana/grafana
restart: unless-stopped
ports:
- 3001:3000
volumes:
# - ./grafana/grafana-volume:/var/lib/grafana
- ./grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
networks:
- promnet
redis:
container_name: redis
image: redis:latest
volumes:
- redis:/val/lib/redis/data
ports:
- "6379:6379"
nginx:
container_name: nginx
image: nginx:latest
ports:
- 80:80
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- frontend
- backend
- ai
networks:
promnet:
driver: bridge
volumes:
postgres:
frontend:
backend: {}
ai:
redis: