-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (53 loc) · 1.19 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
50
51
52
53
version: "3"
services:
blog.test:
build:
context: ./docker
dockerfile: Dockerfile
args:
WWWGROUP: "${WWWGROUP:-blog}"
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "${APP_PORT:-80}:80"
environment:
WWWUSER: "${WWWUSER}"
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
XDEBUG_CONFIG: "${XDEBUG_CONFIG:-client_host=host.docker.internal}"
volumes:
- ".:/var/www/html"
networks:
- blog-net
depends_on:
- mariadb
mariadb:
image: "mariadb:10.7.3"
ports:
- "${FORWARD_DB_PORT:-3306}:3306"
environment:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
MARIADB_USER: "${DB_USER}"
MARIADB_PASSWORD: "${DB_PASSWORD:-secret}"
MARIADB_DATABASE: "${DB_DATABASE}"
volumes:
- "blog-mariadb:/var/lib/mysql"
networks:
- blog-net
healthcheck:
test:
[
"CMD",
"/usr/bin/mysql",
"--user=${DB_USER}",
"--password=${DB_PASSWORD:-secret}",
"--execute",
'"SHOW DATABASES;"',
]
retries: 3
timeout: 5s
networks:
blog-net:
driver: bridge
volumes:
blog-mariadb:
driver: local