traefik_typo3/docker-compose.yml

58 lines
1.9 KiB
YAML
Raw Normal View History

2023-11-26 12:24:49 +01:00
version: '1'
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}"
build: .
networks:
- "traefik"
2023-11-28 20:59:53 +01:00
- "default"
2023-11-26 12:24:49 +01:00
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"
2023-11-28 20:59:53 +01:00
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/typo3conf:/var/www/html/typo3conf"
- "./apache-conf/sites-enabled:/etc/apache2/sites-enabled"
2023-11-26 12:24:49 +01:00
- "./php-conf/php.ini:/usr/local/etc/php/php.ini:ro"
2023-11-29 12:13:26 +01:00
## use for the first install
# - "./LICENSE:/var/www/html/FIRST_INSTALL:ro"
2023-11-26 12:24:49 +01:00
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
depends_on:
- "db"
labels:
# Watchtower add to auto update
- "com.centurylinklabs.watchtower.enable=true"
# 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=80"
db:
image: "mariadb:latest"
container_name: "${PROJECT_NAME}_typo3_db"
restart: "unless-stopped"
2023-11-28 20:59:53 +01:00
networks:
- "default"
2023-11-26 12:24:49 +01:00
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
env_file: ".env"
volumes:
2023-11-29 12:13:26 +01:00
- "${PROJECT_DATA}/${PROJECT_NAME}-typo3/db:/var/lib/mysql"
2023-11-26 12:24:49 +01:00
labels:
# Watchtower add to auto update
- "com.centurylinklabs.watchtower.enable=true"
# traefik
2023-11-29 12:13:26 +01:00
- "traefik.enable=false"