app-store/apps/nextcloud/docker-compose.yml
Nicolas Meienberger 369aa78795 feat(nextcloud): allow app exposure and domain
chore: bump nextcloud version string
2022-09-06 08:53:08 +02:00

69 lines
1.8 KiB
YAML

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.4-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.4-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} ${APP_DOMAIN}
depends_on:
- db-nextcloud
- redis-nextcloud
networks:
- tipi_main_network
labels:
traefik.enable: ${APP_EXPOSED}
traefik.http.routers.nextcloud.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.nextcloud.entrypoints: websecure
traefik.http.routers.nextcloud.service: nextcloud
traefik.http.routers.nextcloud.tls.certresolver: myresolver
traefik.http.services.nextcloud.loadbalancer.server.port: 80