forked from tmalahie/mkpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (46 loc) · 1.5 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
version: '3'
services:
web:
container_name: mkpc_web
build:
context: ./docker/php
depends_on:
db:
condition: service_healthy
volumes:
- .:/var/www/html
- ./docker/php/images/avatars:/var/www/html/images/avatars
- ./docker/php/images/uploads:/var/www/html/images/uploads
- ./docker/php/images/sprites/uploads:/var/www/html/images/sprites/uploads
- ./docker/php/images/creation_icons:/var/www/html/images/creation_icons
- ./docker/php/config:/var/www/html/php/includes/config
- ./docker/php/scripts:/root/scripts
ports:
- "8080:80"
extra_hosts:
- 'host.docker.internal:host-gateway'
db:
image: mariadb:10.5
restart: always
environment:
MYSQL_DATABASE: 'mkpc'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'mkpc_user'
# You can use whatever password you like
MYSQL_PASSWORD: 'mkpc_pwd'
# Password for root access
MYSQL_ROOT_PASSWORD: 'root'
ports:
- '8306:3306'
expose:
- '3306'
healthcheck:
test: ["CMD", "mysql" ,"mkpc", "-u", "mkpc_user", "--password=mkpc_pwd"]
start_period: 10s
timeout: 20s
retries: 10
interval: 2s
volumes:
- mkpc-db:/var/lib/mysql
volumes:
mkpc-db: