version: "3.7" services: db-nextcloud: container_name: db-nextcloud image: postgres:14.2 restart: on-failure volumes: - ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=tipi - POSTGRES_USER=tipi - POSTGRES_DB=nextcloud networks: - tipi_main_network redis-nextcloud: container_name: redis-nextcloud user: "1000:1000" image: redis:6.2.6 restart: on-failure volumes: - "${APP_DATA_DIR}/data/redis:/data" networks: - tipi_main_network cron: image: nextcloud:24.0.3-apache restart: on-failure volumes: - ${APP_DATA_DIR}/data/nextcloud:/var/www/html entrypoint: /cron.sh depends_on: - db-nextcloud - redis-nextcloud networks: - tipi_main_network nextcloud: container_name: nextcloud image: nextcloud:24.0.3-apache restart: unless-stopped ports: - ${APP_PORT}:80 volumes: - ${APP_DATA_DIR}/data/nextcloud:/var/www/html environment: - POSTGRES_HOST=db-nextcloud - REDIS_HOST=redis-nextcloud - POSTGRES_PASSWORD=tipi - POSTGRES_USER=tipi - POSTGRES_DB=nextcloud - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER} - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD} - NEXTCLOUD_TRUSTED_DOMAINS=${INTERNAL_IP}:${APP_PORT} depends_on: - db-nextcloud - redis-nextcloud networks: - tipi_main_network # labels: # traefik.enable: true # traefik.http.routers.nextcloud.rule: Host(`nextcloud.tipi.home`) # traefik.http.routers.nextcloud.service: nextcloud # traefik.http.routers.nextcloud.tls: true # traefik.http.routers.nextcloud.entrypoints: websecure # traefik.http.services.nextcloud.loadbalancer.server.port: 80