Initial Commit
This commit is contained in:
parent
8b998a2d84
commit
1308c41e83
730
docker-compose.yml
Normal file
730
docker-compose.yml
Normal file
@ -0,0 +1,730 @@
|
||||
# Working version : 202403040748 : v4 [Minor Update 6/29/2024 for new node id]
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.10
|
||||
command:
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.swarmMode=true"
|
||||
- "--entrypoints.http.address=:80"
|
||||
- "--entrypoints.https.address=:443"
|
||||
- "--api.insecure=true"
|
||||
- "--api.dashboard=true"
|
||||
- "--api.debug=true"
|
||||
- "--log.level=DEBUG"
|
||||
- "--certificatesresolvers.myresolver.acme.email=tim@veloci-byte.com"
|
||||
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
|
||||
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /mnt/efs/traefik:/data
|
||||
- /mnt/efs/traefik/letsencrypt:/letsencrypt
|
||||
deploy:
|
||||
labels:
|
||||
# Enable Traefik for this service, to make it available in the public network
|
||||
- traefik.enable=true
|
||||
# Use the traefik-public network (declared below)
|
||||
- traefik.docker.network=shared_network
|
||||
# Use the custom label "traefik.constraint-label=traefik-public"
|
||||
# This public Traefik will only use services with this label
|
||||
# That way you can add other internal Traefik instances per stack if needed
|
||||
- traefik.constraint-label=shared_network
|
||||
# admin-auth middleware with HTTP Basic auth
|
||||
# Using the environment variables USERNAME and HASHED_PASSWORD
|
||||
- traefik.http.middlewares.admin-auth.basicauth.users=${USERNAME?Variable not set}:${HASHED_PASSWORD?Variable not set}
|
||||
# https-redirect middleware to redirect HTTP to HTTPS
|
||||
# It can be re-used by other stacks in other Docker Compose files
|
||||
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
|
||||
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
|
||||
# traefik-http set up only to use the middleware to redirect to https
|
||||
# Uses the environment variable DOMAIN
|
||||
- traefik.http.routers.traefik-public-http.rule=Host(`${DOMAIN?Variable not set}`)
|
||||
- traefik.http.routers.traefik-public-http.entrypoints=http
|
||||
- traefik.http.routers.traefik-public-http.middlewares=https-redirect
|
||||
# traefik-https the actual router using HTTPS
|
||||
# Uses the environment variable DOMAIN
|
||||
- traefik.http.routers.traefik-public-https.rule=Host(`${DOMAIN?Variable not set}`)
|
||||
- traefik.http.routers.traefik-public-https.entrypoints=https
|
||||
- traefik.http.routers.traefik-public-https.tls=true
|
||||
# Use the special Traefik service api@internal with the web UI/Dashboard
|
||||
- traefik.http.routers.traefik-public-https.service=api@internal
|
||||
# Use the "le" (Let's Encrypt) resolver created below
|
||||
- traefik.http.routers.traefik-public-https.tls.certresolver=myresolver
|
||||
# Enable HTTP Basic auth, using the middleware created above
|
||||
- traefik.http.routers.traefik-public-https.middlewares=admin-auth
|
||||
# Define the port inside of the Docker service to use
|
||||
- traefik.http.services.traefik-public.loadbalancer.server.port=8080
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
- node.labels.cloud == true
|
||||
|
||||
whoami:
|
||||
# A container that exposes an API to show its IP address
|
||||
image: traefik/whoami
|
||||
labels:
|
||||
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
|
||||
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: 0OX40OaEPoh7
|
||||
MYSQL_DATABASE: main_db
|
||||
MYSQL_USER: wordpress
|
||||
MYSQL_PASSWORD: 6uz3Ge9Sht3k
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
networks:
|
||||
- shared_network
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.id == mcxj7w03qvs69pgnv487cgki7
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
timeout: 20s
|
||||
retries: 10
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mysql
|
||||
MYSQL_ROOT_PASSWORD: 0OX40OaEPoh7
|
||||
ports:
|
||||
- "8081:80"
|
||||
networks:
|
||||
- shared_network
|
||||
|
||||
#pixelus-creative.com - database is wordpress3
|
||||
pixelus-creative_fpm:
|
||||
image: wordpress:php8.1-fpm
|
||||
# healthcheck:
|
||||
# test: ["CMD", "php-fpm", "-t"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 15s
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/pixelus-creative/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/pixelus-creative/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/conf.d/custom.ini
|
||||
- /mnt/efs/pixelus-creative/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=wp3
|
||||
- WORDPRESS_DB_PASSWORD=kCvJQHrBuV8t
|
||||
- WORDPRESS_DB_NAME=wp3_database
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
|
||||
|
||||
nginx_pixelus-creative:
|
||||
image: nginx:latest
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost/"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 15s
|
||||
environment:
|
||||
- VIRTUAL_HOST=pixelus-creative.com,www.pixelus-creative.com
|
||||
- LETSENCRYPT_HOST=pixelus-creative.com,www.pixelus-creative.com
|
||||
- LETSENCRYPT_EMAIL=tim@pixelus-creative.com
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /opt/wordpress/wordpress-base-install:/var/www/html
|
||||
- /mnt/efs/pixelus-creative/nginx:/etc/nginx/conf.d:ro # Assuming you have your Nginx config here
|
||||
- /mnt/efs/pixelus-creative/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/pixelus-creative/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/pixelus-creative/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
depends_on:
|
||||
- pixelus-creative_fpm
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
|
||||
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-http.rule=Host(`www.pixelus-creative.com`)"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.nginx_pixelus-creative-http.rule=Host(`pixelus-creative.com`)"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-http.entrypoints=http"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.nginx_pixelus-creative-https.rule=Host(`pixelus-creative.com`)"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-https.entrypoints=https"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-https.rule=Host(`www.pixelus-creative.com`)"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.nginx_pixelus-creative-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.nginx_pixelus-creative-service.loadbalancer.server.port=80"
|
||||
|
||||
|
||||
wordpress4_cozycorneronline:
|
||||
image: wordpress:latest
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/cozycorner/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/cozycorner/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/php.ini
|
||||
environment:
|
||||
- VIRTUAL_HOST=cozycorneronline.com,www.cozycorneronline.com
|
||||
- LETSENCRYPT_HOST=cozycorneronline.com,www.cozycorneronline.com
|
||||
- LETSENCRYPT_EMAIL=tim@veloci-byte.com
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=wp4
|
||||
- WORDPRESS_DB_PASSWORD=rYxY77k@%K6h
|
||||
- WORDPRESS_DB_NAME=wp4_database
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-http.rule=Host(`www.cozycorneronline.com`)"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-http.rule=Host(`cozycorneronline.com`)"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-https.rule=Host(`cozycorneronline.com`)"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-https.rule=Host(`www.cozycorneronline.com`)"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.wordpress4-cozycorneronline-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.wordpress4-cozycorneronline-service.loadbalancer.server.port=80"
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 1024M
|
||||
|
||||
|
||||
wordpress5_splinters:
|
||||
image: wordpress:latest
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/splinters/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/splinters/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/php.ini
|
||||
environment:
|
||||
- VIRTUAL_HOST=splinterswoodworking.com,www.splinterswoodworking.com
|
||||
- LETSENCRYPT_HOST=splinterswoodworking.com,www.splinterswoodworking.com
|
||||
- LETSENCRYPT_EMAIL=tim@veloci-byte.com
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=wp5
|
||||
- WORDPRESS_DB_PASSWORD=P!tAa#O2!fc6
|
||||
- WORDPRESS_DB_NAME=wp5_database
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress5-splinters-www-http.rule=Host(`www.splinterswoodworking.com`)"
|
||||
- "traefik.http.routers.wordpress5-splinters-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress5-splinters-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress5-splinters-http.rule=Host(`splinterswoodworking.com`)"
|
||||
- "traefik.http.routers.wordpress5-splinters-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress5-splinters-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.wordpress5-splinters-https.rule=Host(`splinterswoodworking.com`)"
|
||||
- "traefik.http.routers.wordpress5-splinters-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress5-splinters-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.wordpress5-splinters-www-https.rule=Host(`www.splinterswoodworking.com`)"
|
||||
- "traefik.http.routers.wordpress5-splinters-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress5-splinters-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.wordpress5-splinters-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.wordpress5-splinters-service.loadbalancer.server.port=80"
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 1024M
|
||||
|
||||
|
||||
wordpress6_autohailrecon:
|
||||
image: wordpress:latest
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/autohailrecon/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/autohailrecon/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/php.ini
|
||||
environment:
|
||||
- VIRTUAL_HOST=auto-hailrecon.com,www.auto-hailrecon.com
|
||||
- LETSENCRYPT_HOST=auto-hailrecon.com,www.auto-hailrecon.com
|
||||
- LETSENCRYPT_EMAIL=tim@veloci-byte.com
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=wp6
|
||||
- WORDPRESS_DB_PASSWORD=anredx@ojnjkmnb1
|
||||
- WORDPRESS_DB_NAME=wp6_database
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-http.rule=Host(`www.auto-hailrecon.com`)"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-http.rule=Host(`auto-hailrecon.com`)"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-https.rule=Host(`auto-hailrecon.com`)"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-https.rule=Host(`www.auto-hailrecon.com`)"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.wordpress6-autohailrecon-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.wordpress6-autohailrecon-service.loadbalancer.server.port=80"
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.5'
|
||||
memory: 1536M
|
||||
|
||||
#sevenoaksstone.com - database is sevenoaksstone
|
||||
sevenoaksstone_fpm:
|
||||
image: wordpress:php8.1-fpm
|
||||
# healthcheck:
|
||||
# test: ["CMD", "php-fpm", "-t"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 15s
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/sevenoaksstone/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/sevenoaksstone/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/conf.d/custom.ini
|
||||
- /mnt/efs/sevenoaksstone/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=sevenoaksstone
|
||||
- WORDPRESS_DB_PASSWORD=Ja[K.Ntiq@7d_vr@
|
||||
- WORDPRESS_DB_NAME=sevenoaksstone
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
# - "node.role==worker"
|
||||
|
||||
|
||||
sevenoaksstone_nginx:
|
||||
image: nginx:latest
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost/"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 15s
|
||||
environment:
|
||||
- VIRTUAL_HOST=sevenoaksstone.com,www.sevenoaksstone.com
|
||||
- LETSENCRYPT_HOST=sevenoaksstone.com,www.sevenoaksstone.com
|
||||
- LETSENCRYPT_EMAIL=tim@pixelus-creative.com
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /opt/wordpress/wordpress-base-install:/var/www/html
|
||||
- /mnt/efs/sevenoaksstone/nginx:/etc/nginx/conf.d:ro # Assuming you have your Nginx config here
|
||||
- /mnt/efs/sevenoaksstone/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/sevenoaksstone/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/sevenoaksstone/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
depends_on:
|
||||
- sevenoaksstone_fpm
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
# - "node.role==worker"
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-http.rule=Host(`www.sevenoaksstone.com`)"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-http.rule=Host(`sevenoaksstone.com`)"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-http.entrypoints=http"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-https.rule=Host(`sevenoaksstone.com`)"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-https.entrypoints=https"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-https.rule=Host(`www.sevenoaksstone.com`)"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.sevenoaksstone_nginx-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.sevenoaksstone_nginx.loadbalancer.server.port=80"
|
||||
|
||||
|
||||
#haleyshoneymeadery.com - database is wp1_database
|
||||
haleyshoneymeadery_fpm:
|
||||
image: wordpress:php8.1-fpm
|
||||
# healthcheck:
|
||||
# test: ["CMD", "php-fpm", "-t"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 15s
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/haleyshoney/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/haleyshoney/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/php.ini
|
||||
- /mnt/efs/haleyshoney/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=wp1
|
||||
- WORDPRESS_DB_PASSWORD=oejS8L3R@Ghu
|
||||
- WORDPRESS_DB_NAME=wp1_database
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
|
||||
|
||||
haleyshoneymeadery_nginx:
|
||||
image: nginx:latest
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost/"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 15s
|
||||
environment:
|
||||
- VIRTUAL_HOST=haleyshoneymeadery.com,www.haleyshoneymeadery.com
|
||||
- LETSENCRYPT_HOST=haleyshoneymeadery.com,www.haleyshoneymeadery.com
|
||||
- LETSENCRYPT_EMAIL=tim@veloci-byte.com
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /opt/wordpress/wordpress-base-install:/var/www/html
|
||||
- /mnt/efs/haleyshoney/nginx:/etc/nginx/conf.d:ro # Assuming you have your Nginx config here
|
||||
- /mnt/efs/haleyshoney/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/haleyshoney/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/haleyshoney/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
depends_on:
|
||||
- haleyshoneymeadery_fpm
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-http.rule=Host(`www.haleyshoneymeadery.com`)"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-http.rule=Host(`haleyshoneymeadery.com`)"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-https.rule=Host(`haleyshoneymeadery.com`)"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-https.rule=Host(`www.haleyshoneymeadery.com`)"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.wordpress1-haleyshoneymeadery-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.wordpress1-haleyshoneymeadery-service.loadbalancer.server.port=80"
|
||||
|
||||
# #mdmhighstandard.com - database is wp2_database
|
||||
# mdmhighstandard_fpm:
|
||||
# image: wordpress:php8.1-fpm
|
||||
# networks:
|
||||
# - shared_network
|
||||
# volumes:
|
||||
# - /mnt/efs/mdm/wp-content:/var/www/html/wp-content
|
||||
# - /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
# - /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
# - /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
# - /mnt/efs/mdm/wp-config.php:/var/www/html/wp-config.php
|
||||
# - /mnt/efs/common/php.ini:/usr/local/etc/php/php.ini
|
||||
# - /mnt/efs/mdm/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
# environment:
|
||||
# - WORDPRESS_DB_HOST=mysql
|
||||
# - WORDPRESS_DB_USER=wp2
|
||||
# - WORDPRESS_DB_PASSWORD=H@ukhzFxILvO
|
||||
# - WORDPRESS_DB_NAME=wp2_database
|
||||
# deploy:
|
||||
# replicas: 1
|
||||
# placement:
|
||||
# constraints:
|
||||
# - node.labels.cloud == true
|
||||
|
||||
# mdmhighstandard_nginx:
|
||||
# image: nginx:latest
|
||||
# environment:
|
||||
# - VIRTUAL_HOST=mdmhighstandard.com,www.mdmhighstandard.com
|
||||
# - LETSENCRYPT_HOST=mdmhighstandard.com,www.mdmhighstandard.com
|
||||
# - LETSENCRYPT_EMAIL=tim@pixelus-creative.com
|
||||
# networks:
|
||||
# - shared_network
|
||||
# volumes:
|
||||
# - /opt/wordpress/wordpress-base-install:/var/www/html
|
||||
# - /mnt/efs/mdm/nginx:/etc/nginx/conf.d:ro
|
||||
# - /mnt/efs/mdm/wp-content:/var/www/html/wp-content
|
||||
# - /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
# - /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
# - /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
# - /mnt/efs/mdm/wp-config.php:/var/www/html/wp-config.php
|
||||
# - /mnt/efs/mdm/wp-content/uploads:/var/www/html/wp-content/uploads
|
||||
# depends_on:
|
||||
# - mdmhighstandard_fpm
|
||||
# deploy:
|
||||
# replicas: 1
|
||||
# placement:
|
||||
# constraints:
|
||||
# - node.labels.cloud == true
|
||||
# labels:
|
||||
# # Redirect HTTP www to HTTPS non-www
|
||||
# - "traefik.http.routers.mdmhighstandard-www-http.rule=Host(`www.mdmhighstandard.com`)"
|
||||
# - "traefik.http.routers.mdmhighstandard-www-http.entrypoints=http"
|
||||
# - "traefik.http.routers.mdmhighstandard-www-http.middlewares=https-redirect"
|
||||
|
||||
# # Redirect HTTP non-www to HTTPS non-www
|
||||
# - "traefik.http.routers.mdmhighstandard-http.rule=Host(`mdmhighstandard.com`)"
|
||||
# - "traefik.http.routers.mdmhighstandard-http.entrypoints=http"
|
||||
# - "traefik.http.routers.mdmhighstandard-http.middlewares=https-redirect"
|
||||
|
||||
# # HTTPS non-www configuration
|
||||
# - "traefik.http.routers.mdmhighstandard-https.rule=Host(`mdmhighstandard.com`)"
|
||||
# - "traefik.http.routers.mdmhighstandard-https.entrypoints=https"
|
||||
# - "traefik.http.routers.mdmhighstandard-https.tls.certresolver=myresolver"
|
||||
|
||||
# # HTTPS www configuration (redirect to non-www)
|
||||
# - "traefik.http.routers.mdmhighstandard-www-https.rule=Host(`www.mdmhighstandard.com`)"
|
||||
# - "traefik.http.routers.mdmhighstandard-www-https.entrypoints=https"
|
||||
# - "traefik.http.routers.mdmhighstandard-www-https.middlewares=www-to-nonwww"
|
||||
# - "traefik.http.routers.mdmhighstandard-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# # Middleware to redirect www to non-www for HTTPS
|
||||
# - "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
# - "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
|
||||
wordpress2_mdmhighstandard:
|
||||
image: wordpress:latest
|
||||
networks:
|
||||
- shared_network
|
||||
volumes:
|
||||
- /mnt/efs/mdm/wp-content:/var/www/html/wp-content
|
||||
- /opt/wordpress/themes:/var/www/html/wp-content/themes
|
||||
- /opt/wordpress/plugins:/var/www/html/wp-content/plugins
|
||||
- /opt/wordpress/upgrade:/var/www/html/wp-content/upgrade
|
||||
- /mnt/efs/mdm/wp-config.php:/var/www/html/wp-config.php
|
||||
- /mnt/efs/common/php.ini:/usr/local/etc/php/php.ini
|
||||
environment:
|
||||
- VIRTUAL_HOST=mdmhighstandard.com,www.mdmhighstandard.com
|
||||
- LETSENCRYPT_HOST=mdmhighstandard.com,www.mdmhighstandard.com
|
||||
- LETSENCRYPT_EMAIL=tim@veloci-byte.com
|
||||
- WORDPRESS_DB_HOST=mysql
|
||||
- WORDPRESS_DB_USER=wp2
|
||||
- WORDPRESS_DB_PASSWORD=H@ukhzFxILvO
|
||||
- WORDPRESS_DB_NAME=wp2_database
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.cloud == true
|
||||
labels:
|
||||
# Redirect HTTP www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-http.rule=Host(`www.mdmhighstandard.com`)"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-http.middlewares=https-redirect"
|
||||
|
||||
# Redirect HTTP non-www to HTTPS non-www
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-http.rule=Host(`mdmhighstandard.com`)"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-http.entrypoints=http"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-http.middlewares=https-redirect"
|
||||
|
||||
# HTTPS non-www configuration
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-https.rule=Host(`mdmhighstandard.com`)"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-https.tls.certresolver=myresolver"
|
||||
|
||||
# HTTPS www configuration (redirect to non-www)
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-https.rule=Host(`www.mdmhighstandard.com`)"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-https.entrypoints=https"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-https.middlewares=www-to-nonwww"
|
||||
- "traefik.http.routers.wordpress2-mdmhighstandard-www-https.tls.certresolver=myresolver"
|
||||
|
||||
# Middleware to redirect www to non-www for HTTPS
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.regex=^https://www\\.(.+)"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.replacement=https://$${1}"
|
||||
- "traefik.http.middlewares.www-to-nonwww.redirectregex.permanent=true"
|
||||
|
||||
# Middleware for HTTPS redirection (define if not already defined)
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
|
||||
# Service definition
|
||||
- "traefik.http.services.wordpress2-mdmhighstandard-service.loadbalancer.server.port=80"
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2'
|
||||
memory: 1536M
|
||||
|
||||
networks:
|
||||
shared_network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
Loading…
x
Reference in New Issue
Block a user