-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (66 loc) · 1.58 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.7'
services:
xenforo_server:
build:
context: .docker
dockerfile: php.dockerfile
container_name: xenforo
healthcheck:
test: [ "CMD", "php-fpm-healthcheck" ]
interval: 15s
timeout: 10s
retries: 3
start_period: 1m
working_dir: /var/www/html
networks:
- xenforo
volumes:
- ./xenforo:/var/www/html
- "./src/${GROUP}:/var/www/html/src/addons/${GROUP}"
environment:
DB_PORT: 3306
DB_HOST: xenforo-db
DB_USER: xenforo
DB_PASSWORD: password
DB_NAME: xenforo
PHP_IDE_CONFIG: 'serverName=localhost'
nginx:
image: nginx:1.19-alpine
container_name: xenforo-nginx
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 15s
timeout: 10s
retries: 3
start_period: 1m
networks:
- xenforo
ports:
- 80:80
volumes:
- ./xenforo:/var/www/html
- ./src:/var/www/html/src/addons
- ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
database:
container_name: xenforo-db
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "$MYSQL_USER", "--password=$MYSQL_PASSWORD"]
interval: 15s
timeout: 10s
retries: 3
start_period: 1m
networks:
- xenforo
ports:
- 3306:3306
image: mariadb:10.3
volumes:
- ./xenforo_db:/var/lib/mysql
environment:
MYSQL_DATABASE: xenforo
MYSQL_USER: xenforo
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: secret
networks:
xenforo:
name: xenforo