-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
113 lines (107 loc) Β· 2.53 KB
/
docker-compose-dev.yml
File metadata and controls
113 lines (107 loc) Β· 2.53 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
services:
jobda-app:
build:
context: .
dockerfile: Dockerfile
container_name: jobda-app
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
elasticsearch:
condition: service_healthy
environment:
WAIT_FOR_DB: true
SPRING_PROFILES_ACTIVE: docker
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
OPENAI_API_KEY_AI: ${OPENAI_API_KEY_AI}
TZ: Asia/Seoul
restart: on-failure
volumes:
- ./logs:/app/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 10s
timeout: 3s
retries: 5
networks:
- jobda-net
db:
image: mysql:8
container_name: jobda-db
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
volumes:
- mysql-data:/var/lib/mysql
restart: always
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-p${MYSQL_ROOT_PASSWORD}" ]
interval: 10s
timeout: 5s
retries: 10
start_period: 60s
networks:
- jobda-net
redis:
image: redis:7.2
container_name: jobda-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
restart: on-failure
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
networks:
- jobda-net
elasticsearch:
build:
context: .
dockerfile: elasticsearch/elasticsearch-nori.Dockerfile
container_name: jobda-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- "9200:9200"
- "9300:9300"
volumes:
- esdata:/usr/share/elasticsearch/data
healthcheck:
test: [ "CMD-SHELL", "curl -s http://localhost:9200/_cluster/health || exit 1" ]
interval: 15s
timeout: 5s
retries: 5
networks:
- jobda-net
kibana:
image: docker.elastic.co/kibana/kibana:8.13.4
container_name: jobda-kibana
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
restart: unless-stopped
networks:
- jobda-net
volumes:
redis-data:
mysql-data:
esdata:
networks:
jobda-net:
external: true