Files
docker-apache-php8/docker-compose.yml
christoph ff732aec4b Reviewed
2023-02-18 19:33:27 +01:00

35 lines
1.0 KiB
YAML

version: "3"
services:
apache:
build:
dockerfile: Dockerfile
context: ./php81-apache
# If not named with "image" the build gets name of the service definition
image: americus259/php:8.1-apache
# pull_policy: < always | never | missing | build >
# build: always build / rebuild the image. you can also run seperatly "docker compose build --pull" before "docker compose up -d"
pull_policy: build
restart: always
networks:
- proxy
volumes:
- ./data/www:/var/www/html
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# ports:
# - "80:80"
labels:
- traefik.enable=true
- traefik.http.routers.my-routername.rule=Host(`www.example.com`)
- traefik.http.routers.my-routername.tls.certResolver=le
- traefik.http.routers.my-routername.service=my-servicename
- traefik.http.services.my-servicename.loadbalancer.server.port=80
- traefik.docker.network=proxy
networks:
proxy:
external: true