-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcompose.yaml
47 lines (44 loc) · 1011 Bytes
/
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
services:
database:
image: mariadb
volumes:
- ./grid.sql:/docker-entrypoint-initdb.d/grid.sql
- database:/var/lib/mysql
environment:
- MARIADB_USER=${DATABASE_USERNAME}
- MARIADB_PASSWORD=${DATABASE_PASSWORD}
- MARIADB_DATABASE=${DATABASE_DATABASE}
- MARIADB_RANDOM_ROOT_PASSWORD=1
healthcheck:
test:
[
"CMD",
"/usr/local/bin/healthcheck.sh",
"--su-mysql",
"--connect",
]
interval: 5s
timeout: 5s
retries: 5
php:
build:
target: php
depends_on:
database:
condition: service_healthy
volumes:
- ./.env:/var/grid/.env
- ./update.php:/var/grid/update.php
- ./classes:/var/grid/classes
- ./public:/var/grid/public
command:
sh -c "php /var/grid/update.php && sleep infinity"
web:
build:
target: web
ports:
- "9714:80"
volumes:
- ./public:/usr/share/nginx/html
volumes:
database: