-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
84 lines (79 loc) · 2.13 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
# PHP interpreters & tools
composer:
profiles: ["composer"]
image: composer:latest
command: /scripts/composer-install.sh
environment:
- COMPOSER_NO_DEV=${COMPOSER_NO_DEV:-}
volumes:
- "${SOURCE_PATH:-../mybb}:/app"
- "./scripts:/scripts"
php:
extends:
service: php_${PHP_IMAGE}
file: docker-compose.partial.yml
volumes:
- "${SOURCE_PATH:-../mybb}:/var/www/html"
- "./xdebug:/var/log/xdebug"
working_dir: /var/www/html
environment:
- PHP_MAX_EXECUTION_TIME=0
- PHP_DISPLAY_ERRORS=1
- PHP_HTML_ERRORS=1
- XDEBUG_CLIENT_HOST=host.docker.internal
- XDEBUG_LOG=/var/log/xdebug/xdebug.log
- XDEBUG_MODE=debug
- XDEBUG_FILE_LINK_FORMAT="phpstorm://open?file=%f&line=%l"
- XDEBUG_OUTPUT_DIR=/var/log/xdebug
- XDEBUG_START_WITH_REQUEST=1
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG:-}
- MYBB_DEV_MODE=${MYBB_DEV_MODE:-}
depends_on:
composer:
condition: service_completed_successfully
install:
profiles: ["install"]
extends:
service: php
command: /scripts/mybb-install.sh
environment:
MYBB_INSTALL_BBURL: http://localhost:${NGINX_PUBLISHED_PORT:-8080}
MYBB_DEV_MODE: ${MYBB_DEV_MODE:-}
volumes:
- "./scripts:/scripts"
# web servers
nginx:
image: nginx:latest
ports:
- "${NGINX_PUBLISHED_PORT:-8080}:80"
volumes:
- "${SOURCE_PATH:-../mybb}:/var/www/html"
- "./nginx/mybb.conf:/etc/nginx/conf.d/default.conf"
depends_on:
php:
condition: service_started
# database systems
postgresql:
profiles: ["db.postgresql"]
image: postgres
environment:
POSTGRES_DB: mybb
POSTGRES_USER: mybb
POSTGRES_PASSWORD: mybb
volumes:
- /var/lib/postgresql/data
ports:
- "${POSTGRESQL_PUBLISHED_PORT:-6432}:5432"
mysql:
profiles: ["db.mysql"]
image: mariadb
environment:
MYSQL_USER: mybb
MYSQL_PASSWORD: mybb
MYSQL_DATABASE: mybb
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
volumes:
- /var/lib/db/data
ports:
- "${MYSQL_PUBLISHED_PORT:-4306}:3306"