-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
75 lines (70 loc) · 1.3 KB
/
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
services:
nginx:
build:
context: nginx
dockerfile: ../_docker/Dockerfile.proxy
ports:
- "8080:80"
volumes:
- ./project:/var/www
networks:
- default
depends_on:
- app
app:
build:
context: project
dockerfile: ../_docker/Dockerfile.app
ports:
- 9000:80
volumes:
- ./project:/var/www
- vendor:/var/www/vendor
networks:
- default
develop:
watch:
- action: sync
path: .
target: /app
depends_on:
- db
nodejs:
build:
context: project
dockerfile: ../_docker/Dockerfile.node
ports:
- 5173:5173
restart: unless-stopped
working_dir: /var/www
volumes:
- ./project:/var/www
- node_modules:/var/www/node_modules
networks:
- default
db:
image: mysql
restart: always
user: mysql
secrets:
- db-password
volumes:
- ./db_data:/var/lib/mysql
environment:
- MYSQL_DATABASE=todo_app
- MYSQL_USER=admin
- MYSQL_PASSWORD=123123
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
networks:
- default
expose:
- 3306
volumes:
node_modules:
vendor:
secrets:
db-password:
file: secrets/db-password.txt
networks:
default:
driver: bridge