-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1 KB
/
docker-compose.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
version: '3.8'
services:
mysql:
image: mysql:8.0
volumes:
- mysql-data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- "3306:3306"
healthcheck:
test: "mysql -h localhost -uroot -p${MYSQL_ROOT_PASSWORD} -e 'SELECT 1;'"
interval: 10s
timeout: 10s
retries: 3
command: --default-authentication-plugin=mysql_native_password
redis:
image: redis:alpine
ports:
- "6379:6379"
command: >
--loglevel warning
--requirepass ${REDIS_PASSWORD}
volumes:
- redis-data:/data
healthcheck:
test: "redis-cli --raw incr ping"
interval: 10s
timeout: 10s
retries: 3
express:
build: .
ports:
- "8080:8080"
depends_on:
redis:
condition: service_healthy
mysql:
condition: service_healthy
volumes:
- node_volumes:/var/express/node_modules/
env_file:
- .env
volumes:
mysql-data:
redis-data:
node_volumes: