-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
51 lines (49 loc) · 1.23 KB
/
Copy pathcompose.yaml
File metadata and controls
51 lines (49 loc) · 1.23 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
services:
server:
build:
context: .
secrets:
- db-password
target: prod
ports:
- 1501:80
- 0:22
depends_on:
db:
condition: service_healthy
secrets:
- db-password
environment:
- DB_PASSWORD_FILE=/run/secrets/db-password
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=db
- DB_USERNAME=root
develop:
watch:
- action: sync
path: .
target: /var/www/html
db:
image: mariadb
restart: always
user: root
secrets:
- db-password
volumes:
- db-data:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD_FILE=/run/secrets/db-password
- MARIADB_DATABASE=db
expose:
- 3306
healthcheck:
test: [ "CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data:
secrets:
db-password:
file: database/password.txt