Update docker compose file for load balancer
This commit is contained in:
parent
40422ab4b0
commit
5d74e10b08
@ -37,10 +37,13 @@ services:
|
|||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "dockerhost:${DOCKER_HOST_IP}"
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
ports:
|
ports:
|
||||||
- "${WORKSPACE_SSH_PORT}:22"
|
- "${WORKSPACE_SSH_PORT}:22"
|
||||||
tty: true
|
tty: true
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### PHP-FPM Container #######################################
|
### PHP-FPM Container #######################################
|
||||||
|
|
||||||
@ -72,6 +75,8 @@ services:
|
|||||||
- "dockerhost:${DOCKER_HOST_IP}"
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
environment:
|
environment:
|
||||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
|
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### PHP Worker Container #####################################
|
### PHP Worker Container #####################################
|
||||||
php-worker:
|
php-worker:
|
||||||
@ -81,6 +86,8 @@ services:
|
|||||||
- applications
|
- applications
|
||||||
depends_on:
|
depends_on:
|
||||||
- workspace
|
- workspace
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Nginx Server Container ##################################
|
### Nginx Server Container ##################################
|
||||||
|
|
||||||
@ -90,15 +97,18 @@ services:
|
|||||||
args:
|
args:
|
||||||
- PHP_UPSTREAM=php-fpm
|
- PHP_UPSTREAM=php-fpm
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
volumes:
|
volumes:
|
||||||
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
|
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
|
||||||
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
|
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
|
||||||
ports:
|
ports:
|
||||||
- "${NGINX_HOST_HTTP_PORT}:80"
|
- "${NGINX_HOST_HTTP_PORT}:80"
|
||||||
- "${NGINX_HOST_HTTPS_PORT}:443"
|
- "${NGINX_HOST_HTTPS_PORT}:443"
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Apache Server Container #################################
|
### Apache Server Container #################################
|
||||||
|
|
||||||
@ -117,6 +127,9 @@ services:
|
|||||||
- "${APACHE_HOST_HTTPS_PORT}:443"
|
- "${APACHE_HOST_HTTPS_PORT}:443"
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### HHVM Container ##########################################
|
### HHVM Container ##########################################
|
||||||
|
|
||||||
@ -128,6 +141,9 @@ services:
|
|||||||
- "9000"
|
- "9000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- workspace
|
- workspace
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Minio Container #########################################
|
### Minio Container #########################################
|
||||||
|
|
||||||
@ -140,6 +156,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MINIO_ACCESS_KEY=access
|
- MINIO_ACCESS_KEY=access
|
||||||
- MINIO_SECRET_KEY=secretkey
|
- MINIO_SECRET_KEY=secretkey
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### MySQL Container #########################################
|
### MySQL Container #########################################
|
||||||
|
|
||||||
@ -155,6 +173,8 @@ services:
|
|||||||
- mysql:/var/lib/mysql
|
- mysql:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
- "${MYSQL_PORT}:3306"
|
- "${MYSQL_PORT}:3306"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### MariaDB Container #######################################
|
### MariaDB Container #######################################
|
||||||
|
|
||||||
@ -169,6 +189,8 @@ services:
|
|||||||
- MYSQL_USER=${MARIADB_USER}
|
- MYSQL_USER=${MARIADB_USER}
|
||||||
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=${MARIADB_PORT}
|
- MYSQL_ROOT_PASSWORD=${MARIADB_PORT}
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### PostgreSQL Container ####################################
|
### PostgreSQL Container ####################################
|
||||||
|
|
||||||
@ -182,6 +204,8 @@ services:
|
|||||||
- POSTGRES_DB=${POSTGRES_DB}
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
- POSTGRES_USER=${POSTGRES_USER}
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### PostgreSQL PostGis Container ############################
|
### PostgreSQL PostGis Container ############################
|
||||||
|
|
||||||
@ -195,6 +219,8 @@ services:
|
|||||||
- POSTGRES_DB=${POSTGRES_DB}
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
- POSTGRES_USER=${POSTGRES_USER}
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Neo4j Container #########################################
|
### Neo4j Container #########################################
|
||||||
|
|
||||||
@ -207,6 +233,8 @@ services:
|
|||||||
- NEO4J_AUTH=default:secret
|
- NEO4J_AUTH=default:secret
|
||||||
volumes:
|
volumes:
|
||||||
- neo4j:/var/lib/neo4j/data
|
- neo4j:/var/lib/neo4j/data
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### MongoDB Container #######################################
|
### MongoDB Container #######################################
|
||||||
|
|
||||||
@ -216,6 +244,8 @@ services:
|
|||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
volumes:
|
volumes:
|
||||||
- mongo:/data/db
|
- mongo:/data/db
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### RethinkDB Container #######################################
|
### RethinkDB Container #######################################
|
||||||
|
|
||||||
@ -225,6 +255,8 @@ services:
|
|||||||
- "8090:8080"
|
- "8090:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- rethinkdb:/data/rethinkdb_data
|
- rethinkdb:/data/rethinkdb_data
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Redis Container #########################################
|
### Redis Container #########################################
|
||||||
|
|
||||||
@ -234,6 +266,8 @@ services:
|
|||||||
- redis:/data
|
- redis:/data
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Aerospike c Container ###################################
|
### Aerospike c Container ###################################
|
||||||
|
|
||||||
@ -248,6 +282,8 @@ services:
|
|||||||
- "3001:3001"
|
- "3001:3001"
|
||||||
- "3002:3002"
|
- "3002:3002"
|
||||||
- "3003:3003"
|
- "3003:3003"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Memcached Container #####################################
|
### Memcached Container #####################################
|
||||||
|
|
||||||
@ -259,6 +295,8 @@ services:
|
|||||||
- "${MEMCACHED_HOST_PORT}:11211"
|
- "${MEMCACHED_HOST_PORT}:11211"
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Beanstalkd Container ####################################
|
### Beanstalkd Container ####################################
|
||||||
|
|
||||||
@ -269,6 +307,8 @@ services:
|
|||||||
privileged: true
|
privileged: true
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### RabbitMQ Container ######################################
|
### RabbitMQ Container ######################################
|
||||||
|
|
||||||
@ -284,6 +324,8 @@ services:
|
|||||||
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Beanstalkd Console Container ############################
|
### Beanstalkd Console Container ############################
|
||||||
|
|
||||||
@ -293,6 +335,8 @@ services:
|
|||||||
- "2080:2080"
|
- "2080:2080"
|
||||||
depends_on:
|
depends_on:
|
||||||
- beanstalkd
|
- beanstalkd
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Caddy Server Container ##################################
|
### Caddy Server Container ##################################
|
||||||
|
|
||||||
@ -310,6 +354,8 @@ services:
|
|||||||
- caddy:/root/.caddy
|
- caddy:/root/.caddy
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### phpMyAdmin Container ####################################
|
### phpMyAdmin Container ####################################
|
||||||
|
|
||||||
@ -324,6 +370,8 @@ services:
|
|||||||
- "${PMA_PORT}:80"
|
- "${PMA_PORT}:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- "${PMA_DB_ENGINE}"
|
- "${PMA_DB_ENGINE}"
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
|
||||||
### pgAdmin Container #######################################
|
### pgAdmin Container #######################################
|
||||||
|
|
||||||
@ -333,6 +381,8 @@ services:
|
|||||||
- "5050:5050"
|
- "5050:5050"
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
|
||||||
### ElasticSearch Container #################################
|
### ElasticSearch Container #################################
|
||||||
|
|
||||||
@ -346,6 +396,8 @@ services:
|
|||||||
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Certbot Container ##################################
|
### Certbot Container ##################################
|
||||||
|
|
||||||
@ -358,6 +410,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- CN="fake.domain.com"
|
- CN="fake.domain.com"
|
||||||
- EMAIL="fake.email@gmail.com"
|
- EMAIL="fake.email@gmail.com"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Mailhog Container #########################################
|
### Mailhog Container #########################################
|
||||||
|
|
||||||
@ -366,8 +420,10 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "1025:1025"
|
- "1025:1025"
|
||||||
- "8025:8025"
|
- "8025:8025"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Selenium Container #########################################
|
### Selenium Container ########################################
|
||||||
|
|
||||||
selenium:
|
selenium:
|
||||||
build: ./selenium
|
build: ./selenium
|
||||||
@ -375,35 +431,97 @@ services:
|
|||||||
- "${SELENIUM_PORT}:4444"
|
- "${SELENIUM_PORT}:4444"
|
||||||
volumes:
|
volumes:
|
||||||
- /dev/shm:/dev/shm
|
- /dev/shm:/dev/shm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Volumes Setup ###########################################
|
### Varnish Proxy 1 ##########################################
|
||||||
|
|
||||||
|
proxy:
|
||||||
|
build: ./varnish
|
||||||
|
expose:
|
||||||
|
- ${VARNISH_PORT}
|
||||||
|
environment:
|
||||||
|
- VARNISH_CONFIG=${VARNISH_CONFIG}
|
||||||
|
- CACHE_SIZE=${VARNISH_PROXY1_CACHE_SIZE}
|
||||||
|
- VARNISHD_PARAMS=${VARNISHD_PARAMS}
|
||||||
|
- VARNISH_PORT=${VARNISH_PORT}
|
||||||
|
- BACKEND_HOST=${VARNISH_PROXY1_BACKEND_HOST}
|
||||||
|
- BACKEND_PORT=${VARNISH_BACKEND_PORT}
|
||||||
|
- VARNISH_SERVER=${VARNISH_PROXY1_SERVER}
|
||||||
|
links:
|
||||||
|
- workspace
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
|
||||||
|
### Varnish Proxy 2 ##########################################
|
||||||
|
|
||||||
|
proxy2:
|
||||||
|
build: ./varnish
|
||||||
|
expose:
|
||||||
|
- ${VARNISH_PORT}
|
||||||
|
environment:
|
||||||
|
- VARNISH_CONFIG=${VARNISH_CONFIG}
|
||||||
|
- CACHE_SIZE=${VARNISH_PROXY2_CACHE_SIZE}
|
||||||
|
- VARNISHD_PARAMS=${VARNISHD_PARAMS}
|
||||||
|
- VARNISH_PORT=${VARNISH_PORT}
|
||||||
|
- BACKEND_HOST=${VARNISH_PROXY2_BACKEND_HOST}
|
||||||
|
- BACKEND_PORT=${VARNISH_BACKEND_PORT}
|
||||||
|
- VARNISH_SERVER=${VARNISH_PROXY2_SERVER}
|
||||||
|
links:
|
||||||
|
- workspace
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
|
||||||
|
### Balancer Haproxy ##########################################
|
||||||
|
|
||||||
|
balancer:
|
||||||
|
build: ./haproxy
|
||||||
|
ports:
|
||||||
|
- "${HAPROXY_HOST_HTTP_PORT}:80"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
links:
|
||||||
|
- proxy
|
||||||
|
- proxy2
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
|
||||||
|
### Networks Setup ############################################
|
||||||
|
|
||||||
|
networks:
|
||||||
|
frontend:
|
||||||
|
driver: "bridge"
|
||||||
|
backend:
|
||||||
|
driver: "bridge"
|
||||||
|
|
||||||
|
### Volumes Setup #############################################
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql:
|
mysql:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
postgres:
|
postgres:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
memcached:
|
memcached:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
redis:
|
redis:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
neo4j:
|
neo4j:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
mariadb:
|
mariadb:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
mongo:
|
mongo:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
minio:
|
minio:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
rethinkdb:
|
rethinkdb:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
aerospike:
|
aerospike:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
caddy:
|
caddy:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
elasticsearch-data:
|
elasticsearch-data:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
elasticsearch-plugins:
|
elasticsearch-plugins:
|
||||||
driver: "local"
|
driver: "local"
|
||||||
|
Loading…
Reference in New Issue
Block a user