docker/apaches/testing/docker-compose.yml

35 lines
1.4 KiB
YAML
Raw Normal View History

2021-05-09 22:07:17 +02:00
version: "3.8"
services:
apache-test:
build: ..
2021-11-10 01:38:24 +01:00
image: my_apache:7.4.25
2021-05-09 22:07:17 +02:00
container_name: apache-test
networks:
- proxy
expose:
- "80"
restart: unless-stopped
env_file: ./secrets/apache-test.secrets
volumes:
- /usr/lib/locale/:/usr/lib/locale/
- /etc/localtime:/etc/localtime:ro
- ${DATA_PATH}/public-html:/var/www/html/
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