2016-10-09 16:47:49 +00:00
|
|
|
##
|
|
|
|
## -------------------------
|
|
|
|
## | D E V I L S T A C K |
|
|
|
|
## -------------------------
|
|
|
|
##
|
|
|
|
## Local LAMP/LEMP stack
|
|
|
|
##
|
|
|
|
##
|
2017-05-10 19:27:10 +00:00
|
|
|
## ${VARIABLE:-default} will evaluate to default if VARIABLE is unset or empty in the environment.
|
|
|
|
## ${VARIABLE-default} will evaluate to default only if VARIABLE is unset in the environment.
|
2016-10-09 16:47:49 +00:00
|
|
|
##
|
|
|
|
##
|
|
|
|
## -- DO NOT EDIT THIS FILE --
|
|
|
|
##
|
2018-04-24 22:24:47 +00:00
|
|
|
## Copy 'docker-compose.override.yml-example' to 'docker-compose.override.yml'
|
|
|
|
## and edit this file with your custom changes (override or even new services).
|
|
|
|
##
|
2016-10-09 16:47:49 +00:00
|
|
|
## Edit '.env' for configuration.
|
|
|
|
##
|
|
|
|
## If '.env' does not exist, copy 'env-example' to '.env'
|
|
|
|
## $ cp env-example .env
|
|
|
|
##
|
|
|
|
|
|
|
|
|
2017-05-06 12:18:13 +00:00
|
|
|
version: '2.1'
|
2016-10-09 16:47:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# SERVICES
|
|
|
|
################################################################################
|
|
|
|
services:
|
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-05-10 19:27:10 +00:00
|
|
|
# Bind (DNS Server)
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-05-10 19:27:10 +00:00
|
|
|
bind:
|
2018-04-28 14:28:13 +00:00
|
|
|
image: cytopia/bind:0.15
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: bind
|
2017-05-10 19:27:10 +00:00
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
# [local-machine:]local-port:docker-port
|
2018-04-28 10:15:41 +00:00
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/tcp"
|
2017-06-20 19:33:24 +00:00
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/udp"
|
2017-05-24 07:31:03 +00:00
|
|
|
|
2017-05-10 19:27:10 +00:00
|
|
|
environment:
|
|
|
|
##
|
|
|
|
## Debug?
|
|
|
|
##
|
2018-04-28 10:15:41 +00:00
|
|
|
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
|
2017-05-10 19:27:10 +00:00
|
|
|
|
|
|
|
##
|
2018-04-28 10:15:41 +00:00
|
|
|
## Bind wildcard/host settings
|
|
|
|
##
|
2017-10-19 15:19:42 +00:00
|
|
|
- WILDCARD_DNS=${TLD_SUFFIX:-loc}=127.0.0.1
|
2018-04-28 10:15:41 +00:00
|
|
|
- EXTRA_HOSTS=${EXTRA_HOSTS}
|
|
|
|
|
|
|
|
##
|
|
|
|
## Forwarding
|
2017-05-10 19:27:10 +00:00
|
|
|
##
|
2017-08-17 06:30:18 +00:00
|
|
|
- DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
|
2017-05-10 19:27:10 +00:00
|
|
|
|
2018-04-28 10:15:41 +00:00
|
|
|
##
|
|
|
|
## Security
|
|
|
|
##
|
|
|
|
- DNSSEC_VALIDATE=${BIND_DNSSEC_VALIDATE:-no}
|
|
|
|
|
|
|
|
##
|
|
|
|
## Time settings
|
|
|
|
##
|
|
|
|
- TTL_TIME=${BIND_TTL_TIME}
|
|
|
|
- REFRESH_TIME=${BIND_REFRESH_TIME}
|
|
|
|
- RETRY_TIME=${BIND_RETRY_TIME}
|
|
|
|
- EXPIRY_TIME=${BIND_EXPIRY_TIME}
|
|
|
|
- MAX_CACHE_TIME=${BIND_MAX_CACHE_TIME}
|
|
|
|
|
|
|
|
##
|
|
|
|
## Query log
|
|
|
|
##
|
|
|
|
- DOCKER_LOGS=${BIND_LOG_DNS_QUERIES}
|
|
|
|
|
2017-05-10 19:27:10 +00:00
|
|
|
dns:
|
|
|
|
- 127.0.0.1
|
|
|
|
|
2018-04-28 14:28:13 +00:00
|
|
|
# MacOS and Windows have this by default, this hack also allows it for Linux
|
|
|
|
extra_hosts:
|
|
|
|
docker.for.lin.host.internal: 172.16.238.1
|
|
|
|
docker.for.lin.localhost: 172.16.238.1
|
|
|
|
|
2017-05-10 19:27:10 +00:00
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
ipv4_address: 172.16.238.100
|
|
|
|
|
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2018-12-28 22:56:14 +00:00
|
|
|
# PHP
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-04-29 14:36:22 +00:00
|
|
|
php:
|
2019-02-16 19:38:14 +00:00
|
|
|
image: devilbox/php-fpm:${PHP_SERVER}-work-0.76
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: php
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-09-26 17:53:31 +00:00
|
|
|
##
|
2017-10-08 10:17:36 +00:00
|
|
|
## All .env variables
|
2017-09-26 17:53:31 +00:00
|
|
|
##
|
|
|
|
## Source all variables defined in .env
|
2017-10-08 10:17:36 +00:00
|
|
|
## This also makes any custom variable available in each PHP/HHVM container
|
2017-09-26 17:53:31 +00:00
|
|
|
##
|
|
|
|
env_file:
|
|
|
|
- ./.env
|
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
environment:
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
2018-04-02 11:45:53 +00:00
|
|
|
## Debug/Logging
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
2018-04-08 10:18:10 +00:00
|
|
|
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
|
2017-04-29 14:36:22 +00:00
|
|
|
- DEBUG_COMPOSE_ENTRYPOINT
|
2018-04-02 11:45:53 +00:00
|
|
|
- DOCKER_LOGS
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## UserID and GroupID
|
|
|
|
##
|
|
|
|
- NEW_UID
|
|
|
|
- NEW_GID
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Adjust timezone
|
|
|
|
##
|
|
|
|
- TIMEZONE
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2018-05-21 08:23:55 +00:00
|
|
|
##
|
|
|
|
## Enable/Disable PHP Modules
|
|
|
|
##
|
|
|
|
- ENABLE_MODULES=${PHP_MODULES_ENABLE}
|
|
|
|
- DISABLE_MODULES=${PHP_MODULES_DISABLE}
|
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Mail-catching
|
|
|
|
##
|
|
|
|
- ENABLE_MAIL=1
|
|
|
|
|
|
|
|
##
|
|
|
|
## Enable 127.0.0.1 Port-forwarding
|
|
|
|
##
|
2018-06-03 12:37:50 +00:00
|
|
|
- FORWARD_PORTS_TO_LOCALHOST=80:httpd:80,443:httpd:443,3306:mysql:3306,5432:pgsql:5432,6379:redis:6379,11211:memcd:11211,27017:mongo:27017
|
2017-04-29 14:36:22 +00:00
|
|
|
|
2017-06-17 11:09:59 +00:00
|
|
|
##
|
|
|
|
## MySQL Backups
|
|
|
|
##
|
|
|
|
- MYSQL_BACKUP_USER=root
|
|
|
|
- MYSQL_BACKUP_PASS=${MYSQL_ROOT_PASSWORD}
|
|
|
|
- MYSQL_BACKUP_HOST=mysql
|
|
|
|
|
2018-04-28 14:28:13 +00:00
|
|
|
dns:
|
|
|
|
- 172.16.238.100
|
|
|
|
|
|
|
|
# MacOS and Windows have this by default, this hack also allows it for Linux
|
|
|
|
extra_hosts:
|
|
|
|
docker.for.lin.host.internal: 172.16.238.1
|
|
|
|
docker.for.lin.localhost: 172.16.238.1
|
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
networks:
|
|
|
|
app_net:
|
2017-05-06 12:18:13 +00:00
|
|
|
ipv4_address: 172.16.238.10
|
2017-04-19 17:48:44 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
|
|
|
|
|
|
|
# Mount custom intranet
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro${MOUNT_OPTIONS}
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-09-26 14:51:49 +00:00
|
|
|
# Mount custom mass virtual hosting
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
|
2017-09-26 14:51:49 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
# Mount logs
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:rw${MOUNT_OPTIONS}
|
2017-04-29 14:36:22 +00:00
|
|
|
|
|
|
|
# Mount Mail directory
|
2019-03-01 12:59:33 +00:00
|
|
|
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
|
2017-04-29 14:36:22 +00:00
|
|
|
|
2017-06-17 11:09:59 +00:00
|
|
|
# Mount DB Backup directory
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/backups:/shared/backups:rw${MOUNT_OPTIONS}
|
2017-06-17 11:09:59 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
# Mount devilbox user-defined *.ini files in order
|
2018-04-07 16:46:37 +00:00
|
|
|
# to overwrite the default PHP.ini configuration
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER}:/etc/php-custom.d:ro${MOUNT_OPTIONS}
|
2018-04-07 16:46:37 +00:00
|
|
|
|
|
|
|
# Mount devilbox user-defined PHP-FPM *.conf files in order
|
|
|
|
# to overwrite the default PHP-FPM configuration
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-08-12 09:05:39 +00:00
|
|
|
# Mount devilbox user-defined *.so files in order
|
|
|
|
# to load custom PHP modules
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS}
|
2017-08-12 09:05:39 +00:00
|
|
|
|
2018-12-25 15:40:19 +00:00
|
|
|
# Mount devilbox user-defined PHP-FPM startup *.sh scripts
|
2018-12-28 23:19:54 +00:00
|
|
|
- ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.1.d:rw${MOUNT_OPTIONS}
|
|
|
|
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
|
2018-12-25 15:40:19 +00:00
|
|
|
|
2017-08-17 19:20:41 +00:00
|
|
|
# Mount devilbox user-defined bash config
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
|
2017-08-17 19:20:41 +00:00
|
|
|
|
2018-05-15 06:38:01 +00:00
|
|
|
# Certificate Authority public key
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}
|
2018-05-15 06:38:01 +00:00
|
|
|
|
2017-05-10 19:27:10 +00:00
|
|
|
depends_on:
|
|
|
|
- bind
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
# Web Server
|
|
|
|
# ------------------------------------------------------------
|
2017-04-29 14:36:22 +00:00
|
|
|
httpd:
|
2019-01-16 17:21:22 +00:00
|
|
|
image: devilbox/${HTTPD_SERVER}:0.28
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: httpd
|
2017-04-19 17:48:44 +00:00
|
|
|
|
|
|
|
environment:
|
|
|
|
|
|
|
|
##
|
2018-04-02 11:45:53 +00:00
|
|
|
## Debug/Logging
|
2017-04-19 17:48:44 +00:00
|
|
|
##
|
2017-09-26 14:51:49 +00:00
|
|
|
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
|
|
|
|
- DEBUG_RUNTIME=${DEBUG_COMPOSE_ENTRYPOINT}
|
2018-04-02 11:45:53 +00:00
|
|
|
- DOCKER_LOGS
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
##
|
2017-04-29 14:36:22 +00:00
|
|
|
## Adjust timezone
|
2017-04-19 17:48:44 +00:00
|
|
|
##
|
2017-04-29 14:36:22 +00:00
|
|
|
- TIMEZONE
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-09-26 14:51:49 +00:00
|
|
|
##
|
|
|
|
## UserID and GroupID
|
|
|
|
##
|
|
|
|
- NEW_UID
|
|
|
|
- NEW_GID
|
|
|
|
|
|
|
|
##
|
|
|
|
## Disable default vhost?
|
|
|
|
##
|
2018-04-30 18:51:18 +00:00
|
|
|
- MAIN_VHOST_ENABLE=${DEVILBOX_UI_ENABLE}
|
2017-09-26 15:44:31 +00:00
|
|
|
- MAIN_VHOST_STATUS_ENABLE=1
|
|
|
|
- MAIN_VHOST_STATUS_ALIAS=/devilbox-httpd-status
|
2018-04-30 18:51:18 +00:00
|
|
|
- MAIN_VHOST_SSL_TYPE=both
|
|
|
|
- MAIN_VHOST_SSL_GEN=1
|
2018-05-02 13:10:08 +00:00
|
|
|
- MAIN_VHOST_SSL_CN=${DEVILBOX_UI_SSL_CN:-localhost}
|
2017-09-26 14:51:49 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
## Enable Mass Vhosts
|
|
|
|
##
|
|
|
|
- MASS_VHOST_ENABLE=1
|
|
|
|
- MASS_VHOST_TLD=.${TLD_SUFFIX}
|
2017-09-28 14:31:33 +00:00
|
|
|
- MASS_VHOST_DOCROOT=${HTTPD_DOCROOT_DIR}
|
2017-09-26 14:51:49 +00:00
|
|
|
- MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR}
|
2018-04-30 18:51:18 +00:00
|
|
|
- MASS_VHOST_SSL_TYPE=both
|
|
|
|
- MASS_VHOST_SSL_GEN=1
|
2017-09-26 14:51:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
##
|
2017-04-29 14:36:22 +00:00
|
|
|
## PHP-FPM Remote Server
|
2017-04-19 17:48:44 +00:00
|
|
|
##
|
2018-12-20 10:32:14 +00:00
|
|
|
- COMPAT=${PHP_SERVER}
|
2017-04-29 14:36:22 +00:00
|
|
|
- PHP_FPM_ENABLE=1
|
|
|
|
- PHP_FPM_SERVER_ADDR=php
|
|
|
|
- PHP_FPM_SERVER_PORT=9000
|
2018-08-05 01:04:03 +00:00
|
|
|
- PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180}
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
ports:
|
|
|
|
# ---- Format: ----
|
|
|
|
# [HOST-ADDR : ] HOST-PORT : DOCKER-PORT
|
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD}:80"
|
2018-04-30 18:50:28 +00:00
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD_SSL}:443"
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
networks:
|
|
|
|
app_net:
|
2017-05-06 12:18:13 +00:00
|
|
|
ipv4_address: 172.16.238.11
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
2016-11-15 18:52:39 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount custom intranet
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro${MOUNT_OPTIONS}
|
2016-11-15 18:52:39 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount custom mass virtual hosting
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
|
2017-09-26 14:51:49 +00:00
|
|
|
|
2017-09-26 17:39:38 +00:00
|
|
|
# Mount custom web server config directory
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS}
|
2017-09-26 17:39:38 +00:00
|
|
|
|
2018-08-05 17:24:42 +00:00
|
|
|
# Mount custom vhost-templates
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d:rw${MOUNT_OPTIONS}
|
2018-08-05 17:24:42 +00:00
|
|
|
|
2017-09-26 14:51:49 +00:00
|
|
|
# Mount logs
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS}
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2018-04-30 18:49:25 +00:00
|
|
|
# Certificate Authority public key
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}
|
2018-04-30 18:49:25 +00:00
|
|
|
|
2017-04-20 14:42:21 +00:00
|
|
|
depends_on:
|
2017-05-10 19:27:10 +00:00
|
|
|
- bind
|
2017-04-29 14:36:22 +00:00
|
|
|
- php
|
2017-04-20 14:42:21 +00:00
|
|
|
|
2016-10-30 13:40:29 +00:00
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
# MySQL Database
|
|
|
|
# ------------------------------------------------------------
|
2017-04-19 17:48:44 +00:00
|
|
|
mysql:
|
2018-12-20 10:32:14 +00:00
|
|
|
image: cytopia/${MYSQL_SERVER}:latest
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: mysql
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
environment:
|
2016-10-24 23:57:53 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Debug?
|
|
|
|
##
|
|
|
|
- DEBUG_COMPOSE_ENTRYPOINT
|
2016-10-24 23:57:53 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Adjust timezone
|
|
|
|
##
|
|
|
|
- TIMEZONE
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Adjust Root password
|
|
|
|
##
|
|
|
|
- MYSQL_ROOT_PASSWORD
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Socket directory Path
|
|
|
|
##
|
2017-04-19 17:48:44 +00:00
|
|
|
- MYSQL_SOCKET_DIR=/tmp/mysql
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
##
|
|
|
|
## Runtime settings
|
|
|
|
##
|
2017-04-19 17:48:44 +00:00
|
|
|
- MYSQL_GENERAL_LOG=${MYSQL_GENERAL_LOG}
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
ports:
|
|
|
|
# [local-machine:]local-port:docker-port
|
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MYSQL}:3306"
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
ipv4_address: 172.16.238.12
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount logs
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql:rw${MOUNT_OPTIONS}
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-21 21:17:59 +00:00
|
|
|
# Mount devilbox default overwrites
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS}
|
2017-04-21 21:17:59 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount devilbox user-defined cnf files in order
|
|
|
|
# to overwrite the MySQL server configuration
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS}
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount MySQL Data directory
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${HOST_PATH_MYSQL_DATADIR}/${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS}
|
2017-05-06 09:27:00 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
depends_on:
|
2017-05-10 19:27:10 +00:00
|
|
|
- bind
|
2017-04-29 14:36:22 +00:00
|
|
|
- php
|
|
|
|
- httpd
|
2016-10-09 16:47:49 +00:00
|
|
|
|
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
# PostgreSQL
|
|
|
|
# ------------------------------------------------------------
|
2017-04-29 14:36:22 +00:00
|
|
|
pgsql:
|
2018-12-20 10:32:14 +00:00
|
|
|
image: postgres:${PGSQL_SERVER}
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: pgsql
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
environment:
|
2016-10-16 08:49:53 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
- POSTGRES_USER=${PGSQL_ROOT_USER}
|
|
|
|
- POSTGRES_PASSWORD=${PGSQL_ROOT_PASSWORD}
|
2017-04-19 17:48:44 +00:00
|
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
ports:
|
|
|
|
# [local-machine:]local-port:docker-port
|
2017-04-29 14:36:22 +00:00
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_PGSQL}:5432"
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
ipv4_address: 172.16.238.13
|
2016-11-15 18:52:39 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
2016-11-15 18:52:39 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount logs
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER}:/var/log/postgresql:rw${MOUNT_OPTIONS}
|
2016-11-15 18:52:39 +00:00
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
# Mount PostgreSQL Data directory
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${HOST_PATH_PGSQL_DATADIR}/${PGSQL_SERVER}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS}
|
2017-05-06 09:27:00 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
depends_on:
|
2017-05-10 19:27:10 +00:00
|
|
|
- bind
|
2017-04-29 14:36:22 +00:00
|
|
|
- php
|
|
|
|
- httpd
|
|
|
|
|
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-04-29 14:36:22 +00:00
|
|
|
# Redis
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-04-29 14:36:22 +00:00
|
|
|
redis:
|
2018-12-20 10:32:14 +00:00
|
|
|
image: redis:${REDIS_SERVER}
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: redis
|
2018-08-11 11:50:21 +00:00
|
|
|
|
|
|
|
# Apply custom arguments to redis startup
|
|
|
|
command: redis-server ${REDIS_ARGS:- }
|
|
|
|
environment:
|
|
|
|
- REDIS_ARGS=${REDIS_ARGS:- }
|
2017-04-29 14:36:22 +00:00
|
|
|
|
|
|
|
ports:
|
|
|
|
# [local-machine:]local-port:docker-port
|
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_REDIS}:6379"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
ipv4_address: 172.16.238.14
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
|
|
|
|
|
|
|
# Mount logs
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER}:/var/log/redis:rw${MOUNT_OPTIONS}
|
2017-05-06 09:27:00 +00:00
|
|
|
|
|
|
|
depends_on:
|
2017-05-10 19:27:10 +00:00
|
|
|
- bind
|
2017-05-06 09:27:00 +00:00
|
|
|
- php
|
|
|
|
- httpd
|
|
|
|
|
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-05-06 09:27:00 +00:00
|
|
|
# Memcached
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
2017-05-20 18:12:31 +00:00
|
|
|
memcd:
|
2018-12-20 10:32:14 +00:00
|
|
|
image: memcached:${MEMCD_SERVER}
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: memcd
|
2017-05-06 09:27:00 +00:00
|
|
|
|
|
|
|
ports:
|
|
|
|
# [local-machine:]local-port:docker-port
|
2017-05-20 18:12:31 +00:00
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEMCD}:11211"
|
2017-05-06 09:27:00 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
ipv4_address: 172.16.238.15
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
|
|
|
|
|
|
|
# Mount logs
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${DEVILBOX_PATH}/log/memcd-${MEMCD_SERVER}:/var/log/memcd:rw${MOUNT_OPTIONS}
|
2017-05-06 09:27:00 +00:00
|
|
|
|
2017-04-29 14:36:22 +00:00
|
|
|
depends_on:
|
2017-05-10 19:27:10 +00:00
|
|
|
- bind
|
2017-04-29 14:36:22 +00:00
|
|
|
- php
|
|
|
|
- httpd
|
2016-11-15 18:52:39 +00:00
|
|
|
|
2016-10-09 16:47:49 +00:00
|
|
|
|
2017-10-08 10:17:36 +00:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
# MongoDB
|
|
|
|
# ------------------------------------------------------------
|
2017-05-22 21:20:20 +00:00
|
|
|
mongo:
|
2018-12-20 10:32:14 +00:00
|
|
|
image: mongo:${MONGO_SERVER}
|
2018-12-28 22:56:14 +00:00
|
|
|
hostname: mongo
|
2017-05-22 21:20:20 +00:00
|
|
|
|
|
|
|
ports:
|
|
|
|
# [local-machine:]local-port:docker-port
|
|
|
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MONGO}:27017"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
ipv4_address: 172.16.238.16
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# ---- Format: ----
|
|
|
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
|
|
|
|
2017-06-18 18:21:40 +00:00
|
|
|
# Mount MongoDB Data directory
|
2018-08-10 07:26:14 +00:00
|
|
|
- ${HOST_PATH_MONGO_DATADIR}/${MONGO_SERVER}:/data/db:rw${MOUNT_OPTIONS}
|
2017-05-22 21:20:20 +00:00
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- bind
|
|
|
|
- php
|
|
|
|
- httpd
|
|
|
|
|
|
|
|
|
2016-10-09 16:47:49 +00:00
|
|
|
################################################################################
|
|
|
|
# NETWORK
|
|
|
|
################################################################################
|
|
|
|
networks:
|
|
|
|
app_net:
|
|
|
|
driver: bridge
|
|
|
|
driver_opts:
|
|
|
|
com.docker.network.enable_ipv6: "false"
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2017-04-19 17:48:44 +00:00
|
|
|
- subnet: 172.16.238.0/24
|
|
|
|
gateway: 172.16.238.1
|
2019-03-01 12:59:33 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# VOLUMES
|
|
|
|
################################################################################
|
|
|
|
volumes:
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
# Misc
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
devilbox-mail:
|