-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcompose.yaml
More file actions
52 lines (51 loc) · 1.14 KB
/
compose.yaml
File metadata and controls
52 lines (51 loc) · 1.14 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
services:
#La web API (node)
api:
build:
context: ./
dockerfile: Dockerfile
restart: always
labels:
- "autoheal=true"
develop:
watch:
- path: ./api/
action: sync
target: /usr/src/app
container_name: ${PROJECT_NAME}-api
ports:
- ${HOST_PORT_API}:3000
depends_on:
db:
condition: service_healthy
restart: true
command: ["./node_modules/nodemon/bin/nodemon.js", "./bin/www"]
db:
image: mysql:8
restart: always
labels:
- "autoheal=true"
environment:
- MYSQL_DATABASE=mydb
- MYSQL_USER=user
- MYSQL_PASSWORD=password
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./init/:/docker-entrypoint-initdb.d/
- ./dbdata:/var/lib/mysql
ports:
- ${HOST_PORT_DB}:3306
container_name: ${PROJECT_NAME}-db
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
interval: 5s
timeout: 5s
retries: 5
adminer:
image: adminer
restart: always
depends_on:
- db
container_name: ${PROJECT_NAME}-adminer
ports:
- ${HOST_PORT_ADMINER}:8080