forked from darthsoup/docker-whmcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (67 loc) · 1.54 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
version: '3.5'
networks:
whmcs:
driver: ${NETWORKS_DRIVER}
volumes:
mysql:
driver: ${VOLUMES_DRIVER}
services:
# nginx
nginx:
build:
context: ./nginx
args:
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
volumes:
- ${WHMCS_PATH}:/var/www/html
- ./nginx/sites/:/etc/nginx/sites-available
- ./.data/logs-nginx/:/var/log/nginx
ports:
- ${NGINX_PORT_HTTP}:80
depends_on:
- php-fpm
networks:
- whmcs
# PHP-FPM
php-fpm:
build:
context: ./php-fpm
dockerfile: ${PHP_VERSION}.Dockerfile
volumes:
- ${WHMCS_PATH}:/var/www/html
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
expose:
- "9000"
environment:
- PHP_IDE_CONFIG=xwhmcs
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
networks:
- whmcs
# MySQL
mysql:
build:
context: ./mysql
args:
- MYSQL_VERSION=${MYSQL_VERSION}
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ./.data/mysql:/var/lib/mysql
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "${MYSQL_PORT}:3306"
networks:
- whmcs
# maildev - to test emails
maildev:
build: ./maildev
ports:
- "${MAILDEV_HTTP_PORT}:80"
- "${MAILDEV_SMTP_PORT}:25"
networks:
- whmcs