docker/apaches/docker-compose.yml
thopic 42da47a706
[PHP] Bump to 7.4.21
CERTFR-2021-AVI-501
2021-07-20 17:19:53 +02:00

40 lines
1.7 KiB
YAML

version: "3.8"
services:
apache:
build: .
image: my_apache:7.4.21
container_name: apache
networks:
- proxy
expose:
- "80"
restart: unless-stopped
env_file: ./secrets/apache.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-http.middlewares=apache-redirect-websecure"
- "traefik.http.routers.apache-http.rule=Host(`${CN}`, `${SAN1}`)"
- "traefik.http.routers.apache-http.entrypoints=web"
- "traefik.http.routers.apache-https.rule=Host(`${CN}`, `${SAN1}`)"
- "traefik.http.routers.apache-https.entrypoints=websecure"
- "traefik.http.routers.apache-https.middlewares=apache-redirectregex"
- "traefik.http.routers.apache-https.tls=true"
- "traefik.http.routers.apache-https.tls.certresolver=myhttpchallenge"
- "traefik.http.middlewares.apache-redirectregex.redirectregex.regex=^https://${SAN1}/(.*)"
- "traefik.http.middlewares.apache-redirectregex.redirectregex.replacement=https://${CN}/$${1}"
# - "traefik.http.middlewares.apache-travaux.redirectregex.regex=^https://${TRAVAUXCN}/"
# - "traefik.http.middlewares.apache-travaux.redirectregex.replacement=https://${CN}/travaux.php"
# - "traefik.http.routers.apache-https.middlewares=apache-redirectregex,apache-travaux"
- "co.elastic.logs/module=apache"
- "co.elastic.logs/fileset=access"
networks:
proxy:
external: true