version: '1' networks: default: name: "${TRAEFIK_NETWORK}" external: true db: name: "${PROJECT_NAME}_wordpress_db_net" external: false be: name: "${PROJECT_NAME}_wordpress_net" external: false services: webserver: image: "nginx:alpine" depends_on: - "wordpress" container_name: "${PROJECT_NAME}_wordpress_web" hostname: "${PROJECT_URL}" restart: "unless-stopped" volumes: - "wordpress:/var/www/html" - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/wordpress/plugins:/var/www/html/wp-content/plugins" - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/wordpress/themes:/var/www/html/wp-content/themes" - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/wordpress/uploads:/var/www/html/wp-content/uploads" - "./nginx-conf:/etc/nginx/conf.d" - "./php-conf:/usr/local/etc/php" #- ./wordpress-data/installer.php:/var/www/html/installer.php #- ./wordpress-data/earthman_20231010_f058a22d5085e51c3204_20231010103457_archive.zip:/var/www/html/earthman_20231010_f058a22d5085e51c3204_20231010103457_archive.zip:ro networks: - "be" labels: # Watchtower add to auto update - "com.centurylinklabs.watchtower.enable=true" # traefik - "traefik.enable=true" - "traefik.docker.network=${TRAEFIK_NETWORK}" #- "traefik.tcp.routers.${PROJECT_NAME}_sftp.rule=HostSNI(`${PROJECT_URL}`)" # tls - "traefik.http.services.${PROJECT_NAME}_wordpress.loadbalancer.server.port=80" - "traefik.http.routers.${PROJECT_NAME}_wordpress.rule=Host(`${PROJECT_URL}`)" - "traefik.http.routers.${PROJECT_NAME}_wordpress.entrypoints=websecure" - "traefik.http.routers.${PROJECT_NAME}_wordpress.tls=true" wordpress: image: "wordpress:fpm-alpine" depends_on: - "db" container_name: "${PROJECT_NAME}_wordpress_fpm" restart: "unless-stopped" volumes: - "wordpress:/var/www/html" - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/wordpress/plugins:/var/www/html/wp-content/plugins" - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/wordpress/themes:/var/www/html/wp-content/themes" - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/wordpress/uploads:/var/www/html/wp-content/uploads" - "./php-conf/php.ini:/usr/local/etc/php/php.ini:ro" env_file: ".env" user: "1000" environment: - "WORDPRESS_DB_HOST=db" - "WORDPRESS_DB_USER=${MYSQL_USER}" - "WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}" - "WORDPRESS_DB_NAME=${MYSQL_DATABASE}" networks: - "db" - "be" labels: # Watchtower add to auto update - "com.centurylinklabs.watchtower.enable=false" # traefik - "traefik.enable=false" db: image: "mariadb:latest" container_name: "${PROJECT_NAME}_wordpress_db" hostname: "${PROJECT_URL}" restart: "unless-stopped" command: '--default-authentication-plugin=mysql_native_password' env_file: ".env" volumes: - "${PROJECT_DATA}/${PROJECT_NAME}-wordpress/db/:/var/lib/mysql" networks: - "db" labels: # Watchtower add to auto update - "com.centurylinklabs.watchtower.enable=true" # traefik - "traefik.enable=false" volumes: wordpress: name: "${PROJECT_NAME}_wordpress"