-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
99 lines (98 loc) · 2.89 KB
/
docker-compose.yaml
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
version: "3.7"
services:
redis:
image: redis:alpine
command: redis-server --port 6379
container_name: ${REDIS_CONTAINER_NAME}
hostname: rf
restart: always
labels:
- "name=redis"
- "mode=standalone"
ports:
- 30000:${REDIS_PORT}
mysql:
image: mysql:8
container_name: ${DB_CONTAINER_NAME}
restart: always
cap_add:
- SYS_NICE
ports:
- 3309:3306
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
# env_file:
# - .env
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --default-authentication-plugin=mysql_native_password
- --sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
volumes:
- ./mysql/initdb.d:/docker-entrypoint-initdb.d
- ./dbdata:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 2s
retries: 100
node:
container_name: rf-server
build:
context: ./
restart: always
command: npm run start:dev
ports:
- ${PORT}:${PORT}
depends_on:
mysql:
condition: service_healthy
environment:
- DATABASE_URL=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${DB_CONTAINER_NAME}/${MYSQL_DATABASE}
env_file:
- .env
volumes:
- ./logs:/app/logs
- ./images:/app/images
prod-elasticsearch:
build: ./elasticsearch
container_name: prod-es
environment:
- node.name=es
- cluster.name=es-docker-cluster
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9201:9200
volumes:
- es_data:/usr/share/elasticsearch/data
# caddy:
# container_name: rf-caddy
# build:
# context: ./caddy
# restart: always
# ports:
# - "80:80"
# - "443:443"
# volumes:
# # - ./site:/srv
# # - ./caddy:/etc/caddy/Caddyfile
# # - $PWD/site:/srv
# # - $PWD/caddy:/etc/caddy/Caddyfile
# - caddy_data:/data
# - caddy_config:/config
# volumes:
# caddy_data:
# # external: true
# caddy_config:
volumes:
es_data: