-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1.12 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
services:
app:
build:
context: ./
args:
- PORT=${PORT}
ports:
- ${PORT}:${PORT}
command: npm run start:dev
volumes:
- ./:/usr/src/app
- node_modules:/usr/src/app/node_modules
depends_on:
mysql:
condition: service_healthy
extra_hosts:
- 'host.docker.internal:host-gateway'
restart: on-failure
environment:
- NODE_ENV=development
mysql:
image: 'mysql/mysql-server:8.0'
ports:
- '${DB_PORT:-3306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-password}'
MYSQL_DATABASE: '${DB_DATABASE:-velvet}'
MYSQL_USER: '${DB_USERNAME:-velvet}'
MYSQL_PASSWORD: '${DB_PASSWORD:-password}'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- 'mysql:/var/lib/mysql'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-p${DB_PASSWORD:-password}']
retries: 3
timeout: 5s
adminer:
image: 'adminer'
ports:
- '${ADMINER_PORT:-8080}:8080'
volumes:
mysql:
driver: local
node_modules:
driver: local