version: '2.4' services: redis: image: redis:6.2.0 restart: unless-stopped volumes: - /var/redis:/data networks: - "nextcloud_net" nextcloud: build: ./nextcloud-fpm restart: unless-stopped environment: POSTGRES_DB: nextcloud POSTGRES_USER: nextcloud POSTGRES_HOST: postgres POSTGRES_PASSWORD: ${POSTGRES_DB_PASSWORD} TRUSTED_PROXIES: "cloud.teier.net 138.201.74.231 172.0.0.1/8" APACHE_DISABLE_REWRITE_IP: "1" OVERWRITEHOST: "cloud.teier.net" OVERWRITEPROTOCOL: "https" OVERWRITEWEBROOT: "/" OVERWRITECONADDR: "138.201.74.231" REDIS_HOST: redis networks: - "postgres_net" - "nextcloud_net" volumes: - /var/nextcloud:/var/www/html - /mnt/mathias:/mnt/mathias - /mnt/public:/mnt/public web: image: nginx restart: unless-stopped ports: - 8081:80 networks: - "nextcloud_net" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro volumes_from: - nextcloud networks: nextcloud_net: name: "nextcloud_net" driver: bridge postgres_net: name: "postgres_net" external: true