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" - "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" - "./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=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" 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"