mirror of
https://github.com/opdavies/build-configs.git
synced 2025-01-22 18:27:31 +00:00
Update hostname to *.docker.localhost
Following updates in https://github.com/opdavies/traefik-development to add HTTPS support to Docker Compose-based projects, this commit changes the host name from `*.localhost` to `*.docker.localhost`. This should allow each project to be available at https://{project_name}.docker.localhost instead of http://{project_name}.localhost.
This commit is contained in:
parent
43849524a2
commit
abf76c50bb
|
@ -5,13 +5,15 @@ x-proxy: &default-proxy
|
|||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
|
||||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
|
||||
{% for host in web.extra_hosts | default([]) -%}
|
||||
{{ '`' ~ host ~ '`,' }}
|
||||
{%- endfor %}
|
||||
)"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
|
@ -27,7 +29,7 @@ x-app: &default-app
|
|||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
|
|
|
@ -5,13 +5,15 @@ x-proxy: &default-proxy
|
|||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
|
||||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
|
||||
{% for host in web.extra_hosts | default([]) -%}
|
||||
{{ '`' ~ host ~ '`,' }}
|
||||
{%- endfor %}
|
||||
)"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
|
@ -27,7 +29,7 @@ x-app: &default-app
|
|||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
|
@ -74,7 +76,7 @@ services:
|
|||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
profiles: [database]
|
||||
|
|
|
@ -5,10 +5,12 @@ x-proxy: &default-proxy
|
|||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
|
||||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
|
||||
)"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
|
@ -24,7 +26,7 @@ x-app: &default-app
|
|||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
|
@ -63,7 +65,7 @@ services:
|
|||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
profiles: [database]
|
||||
|
|
|
@ -5,10 +5,12 @@ x-proxy: &default-proxy
|
|||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
|
||||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
|
||||
)"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
|
@ -24,7 +26,7 @@ x-app: &default-app
|
|||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
|
@ -63,7 +65,7 @@ services:
|
|||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
profiles: [database]
|
||||
|
|
|
@ -5,10 +5,12 @@ x-proxy: &default-proxy
|
|||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
|
||||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
|
||||
)"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
|
@ -24,7 +26,7 @@ x-app: &default-app
|
|||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
|
@ -63,7 +65,7 @@ services:
|
|||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
profiles: [database]
|
||||
|
|
|
@ -5,10 +5,12 @@ x-proxy: &default-proxy
|
|||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
|
||||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
|
||||
)"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
|
@ -24,7 +26,7 @@ x-app: &default-app
|
|||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
- "traefik.enable=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
|
|
Loading…
Reference in a new issue