traefik_typo3/docker-compose.yml
2023-12-05 11:00:02 +01:00

64 lines
2.3 KiB
YAML

version: '3.8'
networks:
default:
name: "${PROJECT_NAME}_typo3_db_net"
external: false
traefik:
name: "${TRAEFIK_NETWORK}"
external: true
services:
typo3:
container_name: "${PROJECT_NAME}_typo3"
hostname: "${PROJECT_URL}"
image: "altogether/typo3:12.4.8-apache"
user: "1000"
networks:
- "traefik"
- "default"
volumes:
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/fileadmin:/var/www/html/fileadmin"
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/uploads:/var/www/html/uploads"
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/protected:/var/www/protected"
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/typo3conf:/var/www/html/typo3conf"
- "./apache-conf/sites-enabled:/etc/apache2/sites-enabled"
- "./apache-conf/.htaccess:/var/www/html/.htaccess"
- "./php-conf/php.ini:/usr/local/etc/php/php.ini:ro"
## use for the first install
#- "./LICENSE:/var/www/html/FIRST_INSTALL:ro"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
depends_on:
- "db"
labels:
# Watchtower add to auto update
- "com.centurylinklabs.watchtower.enable=false"
# traefik
- "traefik.enable=true"
- "traefik.docker.network=${TRAEFIK_NETWORK}"
- "traefik.http.routers.${PROJECT_NAME}_typo3.rule=Host(`${PROJECT_URL}`)"
- "traefik.http.routers.${PROJECT_NAME}_typo3.entrypoints=websecure"
- "traefik.http.routers.${PROJECT_NAME}_typo3.tls=true"
- "traefik.http.services.${PROJECT_NAME}_typo3.loadbalancer.server.port=443"
# Use the special Traefik service api@internal with the web UI/Dashboard
# - traefik.http.routers.${PROJECT_NAME}_typo3.service=api@internal
# Use the "le" (Let's Encrypt) resolver created below
# - traefik.http.routers.${PROJECT_NAME}_typo3.tls.certresolver=le
db:
image: "mariadb:latest"
container_name: "${PROJECT_NAME}_typo3_db"
restart: "unless-stopped"
networks:
- "default"
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
env_file: ".env"
volumes:
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/db:/var/lib/mysql"
labels:
# Watchtower add to auto update
- "com.centurylinklabs.watchtower.enable=true"
# traefik
- "traefik.enable=false"