89 lines
2.6 KiB
YAML
89 lines
2.6 KiB
YAML
# Copyright 2025-2026 Thomas Hintz
|
|
|
|
# This file is part of Nassella.
|
|
|
|
# Nassella is free software: you can redistribute it and/or modify it under the
|
|
# terms of the GNU Affero General Public License as published by the Free
|
|
# Software Foundation, either version 3 of the License, or (at your option) any
|
|
# later version.
|
|
|
|
# Nassella is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with Nassella. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
secrets:
|
|
nextcloud_postgres_db:
|
|
file: ./nextcloud/postgres_db
|
|
nextcloud_postgres_password:
|
|
file: ./nextcloud/postgres_password
|
|
nextcloud_postgres_user:
|
|
file: ./nextcloud/postgres_user
|
|
nextcloud_redis_password:
|
|
file: ./nextcloud/redis_password
|
|
|
|
services:
|
|
nextcloud_db:
|
|
image: postgres:18-trixie
|
|
env_file:
|
|
- ./nextcloud/nextcloud.env
|
|
shm_size: 128mb
|
|
restart: always
|
|
volumes:
|
|
- /nassella/nextcloud/var-lib-postgresql:/var/lib/postgresql
|
|
networks:
|
|
- nextcloud_internal
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d `cat $$POSTGRES_DB_FILE` -U `cat $$POSTGRES_USER_FILE`"]
|
|
start_period: 15s
|
|
interval: 30s
|
|
retries: 3
|
|
timeout: 5s
|
|
secrets:
|
|
- nextcloud_postgres_db
|
|
- nextcloud_postgres_password
|
|
- nextcloud_postgres_user
|
|
nextcloud_redis:
|
|
image: redis:8-trixie
|
|
env_file:
|
|
- ./nextcloud/nextcloud.env
|
|
command: bash -c 'redis-server --requirepass "$$(cat /run/secrets/nextcloud_redis_password)"'
|
|
secrets:
|
|
- nextcloud_redis_password
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli --no-auth-warning -a \"$$(cat /run/secrets/nextcloud_redis_password)\" ping | grep PONG"]
|
|
start_period: 10s
|
|
interval: 30s
|
|
retries: 3
|
|
timeout: 3s
|
|
networks:
|
|
- nextcloud_internal
|
|
nextcloud:
|
|
image: nextcloud:34-apache
|
|
depends_on:
|
|
nextcloud_redis:
|
|
condition: service_healthy
|
|
nextcloud_db:
|
|
condition: service_healthy
|
|
env_file:
|
|
- ./nextcloud/nextcloud.env
|
|
secrets:
|
|
- nextcloud_postgres_db
|
|
- nextcloud_postgres_password
|
|
- nextcloud_postgres_user
|
|
- nextcloud_redis_password
|
|
networks:
|
|
- lb
|
|
- nextcloud_internal
|
|
volumes:
|
|
- /nassella/nextcloud/var-www-html:/var/www/html
|
|
restart: unless-stopped
|
|
networks:
|
|
lb:
|
|
nextcloud_internal:
|
|
driver: bridge
|
|
internal: true
|