-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (46 loc) · 1.02 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
# Initializes a new nodejs project with docker
version: '3.7'
services:
app:
depends_on:
db:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile
target: development
image: zero-wars-api
container_name: zero-wars-api
restart: unless-stopped
command: sh -c "npm install --no-audit --no-fund && npm run start:dev"
ports:
- '5000:5000'
volumes:
- ./:/usr/src/app
networks:
- zerowars
db:
image: mysql:8.3.0
restart: unless-stopped
volumes:
- ./storage/mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: zerowars
MYSQL_ROOT_PASSWORD: password
MYSQL_PASSWORD: password
MYSQL_USER: app
SERVICE_TAGS: dev
SERVICE_NAME: mysql
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 20s
retries: 3
interval: 5s
start_period: 5s
ports:
- 3307:3306
networks:
- zerowars
networks:
zerowars:
driver: bridge