-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.be-main.yml
88 lines (82 loc) · 2.12 KB
/
docker-compose.be-main.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
services:
backend:
image: zzun73/sogoo-be-main:main-latest
container_name: sogoo-be-main
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/sosang
SPRING_DATASOURCE_USERNAME: ${DB_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD}
CONFIG_USERNAME: ${CONFIG_USERNAME}
CONFIG_PASSWORD: ${CONFIG_PASSWORD}
depends_on:
- postgres
- elasticsearch
networks:
- sogoo-network
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
postgres:
image: postgres:16.4
container_name: sogoo-postgres
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- sogoo-network
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME}"]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4
container_name: sogoo-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms3g -Xmx3g
ports:
- "9200:9200"
- "9300:9300"
networks:
- sogoo-network
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
command: >
bash -c "./bin/elasticsearch-plugin install analysis-nori || exit 1;
/usr/local/bin/docker-entrypoint.sh"
redis:
image: redis:latest
container_name: sogoo-redis
ports:
- "6379:6379"
networks:
- sogoo-network
volumes:
- redis-data:/data
restart: always
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD}"]
networks:
sogoo-network:
driver: bridge
volumes:
postgres-data:
redis-data: