-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 1.9 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (82 loc) · 1.9 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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
networks:
- xenforo
ports:
- 9000:9000
restart: always
working_dir: /var/www/html
volumes:
- xenforo-data:/var/www/html
- ./config.php:/var/www/html/src/config.php
- ./.docker/xdebug.ini:/usr/local/etc/php/conf.d/xdebug-local.ini
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-data:/var/www/html
- ./config.php:/var/www/html/src/config.php
- xenforo-nginx-conf:/etc/nginx/conf.d/
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-database:/var/lib/mysql
environment:
MYSQL_DATABASE: xenforo
MYSQL_USER: xenforo
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: secret
volumes:
xenforo-database:
xenforo-data:
driver_opts:
type: none
o: bind
device: $PWD
xenforo-nginx-conf:
driver_opts:
type: none
o: bind
device: $PWD/.docker/nginx/
networks:
xenforo:
name: xenforo