docker/apaches/testing/docker-compose.yml

34 lines
1.3 KiB
YAML
Raw Normal View History

2021-05-09 22:07:17 +02:00
version: "3.8"
services:
apache-test:
build: ..
image: my_apache:7.4.26
2021-05-09 22:07:17 +02:00
container_name: apache-test
networks:
- proxy
expose:
- "80"
restart: unless-stopped
volumes:
- /usr/lib/locale/:/usr/lib/locale/
- /etc/localtime:/etc/localtime:ro
- ${DATA_PATH}:/var/www/
2021-05-09 22:07:17 +02:00
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.apache-redirect-websecure.redirectscheme.scheme=https"
- "traefik.http.routers.apache-test-http.middlewares=apache-redirect-websecure"
- "traefik.http.routers.apache-test-http.rule=Host(`${CN}`, `${SAN1}`)"
- "traefik.http.routers.apache-test-http.entrypoints=web"
- "traefik.http.routers.apache-test-https.rule=Host(`${CN}`, `${SAN1}`)"
- "traefik.http.routers.apache-test-https.entrypoints=websecure"
- "traefik.http.routers.apache-test-https.middlewares=apache-test-redirectregex"
- "traefik.http.routers.apache-test-https.tls=true"
- "traefik.http.routers.apache-test-https.tls.certresolver=myhttpchallenge"
- "traefik.http.middlewares.apache-test-redirectregex.redirectregex.regex=^https://${SAN1}/(.*)"
- "traefik.http.middlewares.apache-test-redirectregex.redirectregex.replacement=https://${CN}/$${1}"
networks:
proxy:
external: true