Commit 6be6d27b authored by Michael Iseard's avatar Michael Iseard
Browse files

Add HOST env var

parent 23cfe2c6
# general
HOST=subdomain.domain.com
CONTAINER_PREFIX=myproject
# wordpress - wordpress:php7.3-fpm
WORDPRESS_VERSION=php7.3-fpm
WORDPRESS_DB_NAME=wordpress
......
......@@ -6,7 +6,7 @@ services:
image: adminer
container_name: ${CONTAINER_PREFIX}-adminer
ports:
- ${ADMINER_PORT}:8080
- ${ADMINER_PORT:-8080}:8080
links:
- mysql
networks:
......@@ -43,7 +43,7 @@ services:
depends_on:
- mysql
volumes:
- ${WORDPRESS_DATA_DIR:-./wordpress}:/var/www/html/
- ${WORDPRESS_DIR:-./wordpress}:/var/www/html/
environment:
- WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME:-wordpress}
- WORDPRESS_TABLE_PREFIX=${WORDPRESS_TABLE_PREFIX:-wp_}
......@@ -62,14 +62,14 @@ services:
- ${NGINX_CONF_DIR:-./nginx}/conf.d:/etc/nginx/conf.d/
- ${NGINX_CONF_DIR:-./nginx}/snippets:/etc/nginx/snippets/
- ${NGINX_LOG_DIR:-./logs/nginx}:/var/log/nginx/
- ${WORDPRESS_DATA_DIR:-./wordpress}:/var/www/html/
- ${WORDPRESS_DIR:-./wordpress}:/var/www/html/
depends_on:
- wordpress
restart: always
labels:
- traefik.enable=true
- traefik.docker.network=web
- traefik.http.routers.${CONTAINER_PREFIX}.rule=Host(`diamant.iseard.media`)
- traefik.http.routers.${CONTAINER_PREFIX}.rule=Host(`${HOST}`)
- traefik.http.routers.${CONTAINER_PREFIX}.tls.certresolver=cloudflare
- traefik.http.services.${CONTAINER_PREFIX}.loadbalancer.server.port=80
- traefik.http.routers.${CONTAINER_PREFIX}.entrypoints=websecure
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment