version: "3.8" services: nextcloud_db: image: mariadb:10.5.4 container_name: nextcloud_db2 env_file: - ./secrets/db.secrets volumes: - ./data/db:/var/lib/mysql restart: unless-stopped nextcloud_app: image: nextcloud:19.0.10 depends_on: - nextcloud_db container_name : nextcloud_app2 networks: - proxy - default expose: - "80" links: - nextcloud_db volumes: - ./data/app/config.php:/var/www/html/config/config.php hostname: ${CN} restart: unless-stopped labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "traefik.http.middlewares.nc2-redirect-websecure.redirectscheme.scheme=https" - "traefik.http.routers.nc2-http.middlewares=nc2-redirect-websecure" - "traefik.http.routers.nc2-http.rule=Host(`${CN}`)" - "traefik.http.routers.nc2-http.entrypoints=web" - "traefik.http.routers.nc2-https.rule=Host(`${CN}`)" - "traefik.http.routers.nc2-https.entrypoints=websecure" - "traefik.http.routers.nc2-https.tls=true" - "traefik.http.routers.nc2-https.tls.certresolver=myhttpchallenge" networks: proxy: external: true