-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.infra.yml
More file actions
107 lines (102 loc) · 2.5 KB
/
docker-compose.infra.yml
File metadata and controls
107 lines (102 loc) · 2.5 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
services:
mysql:
image: mysql:8.0
container_name: techfork-mysql
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=techblog
- MYSQL_USER=techfork
- MYSQL_PASSWORD=${DB_PASSWORD}
- TZ=Asia/Seoul
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --innodb-buffer-pool-size=2G
volumes:
- mysql-data:/var/lib/mysql
networks:
techfork-network:
aliases:
- mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: techfork-redis
restart: always
ports:
- "6379:6379"
command:
redis-server
--requirepass ${REDIS_PASSWORD}
--maxmemory 1gb
--maxmemory-policy allkeys-lru
--save ""
--appendonly no
--rename-command KEYS ""
--rename-command FLUSHALL ""
--rename-command FLUSHDB ""
volumes:
- redis-data:/data
networks:
techfork-network:
aliases:
- redis
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.18.0
container_name: techfork-elasticsearch
hostname: techfork-elasticsearch
restart: always
ports:
- "9200:9200"
- "9300:9300"
environment:
- node.name=techfork-elasticsearch
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms8g -Xmx8g"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
networks:
techfork-network:
aliases:
- elasticsearch
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 60s
nginx:
image: nginx:stable-alpine
container_name: techfork-nginx
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
networks:
techfork-network:
aliases:
- nginx
networks:
techfork-network:
external: true
volumes:
mysql-data:
redis-data:
elasticsearch-data: