-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.35 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
# docker-compose.yml
services:
postgres:
image: postgres:16
container_name: usinsa-postgres
restart: unless-stopped
ports:
- "5432:5432" # 호스트:컨테이너
environment:
POSTGRES_DB: usinsa
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
TZ: Asia/Seoul
volumes:
- db_data:/var/lib/postgresql/data
- ./docker/init:/docker-entrypoint-initdb.d # 초기 스키마/데이터 넣고 싶을 때
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d usinsa"]
interval: 5s
timeout: 3s
retries: 10
# ES
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.0
container_name: usinsa-elasticsearch
restart: unless-stopped
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
ports:
- "9200:9200"
volumes:
- es-data:/usr/share/elasticsearch/data
# Redis
redis:
image: redis:7.2
container_name: usinsa-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes --requirepass usinsa
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
db_data:
redis-data:
es-data: