These three containers were writing multi-GB/day of unbounded logs (authentik_server 3.5GB, immich-server 2.3GB, owncloud_mariadb 2.1GB), a major contributor to a recent 100% disk-full incident. Daemon-wide default (max-size 10m, max-file 3) was also added to /etc/docker/daemon.json on valhalla, but that only covers newly created containers going forward -- these three need the explicit per-service override since they're long-running and won't be recreated otherwise. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
# owncloud stack — ownCloud server + its dedicated MariaDB and Redis.
|
|
# DB/cache stay co-located with the app so depends_on health-gating keeps working.
|
|
# All data is bind-mounted already (/config/owncloud, /config/mysql, /config/redis).
|
|
# Only the owncloud server joins `edge`; mariadb/redis stay private.
|
|
|
|
services:
|
|
owncloud:
|
|
image: owncloud/server:latest
|
|
container_name: owncloud_server
|
|
restart: unless-stopped
|
|
networks: [owncloud, edge]
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
mariadb:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- stack.env
|
|
environment:
|
|
- OWNCLOUD_DB_TYPE=mysql
|
|
- OWNCLOUD_DB_NAME=owncloud
|
|
- OWNCLOUD_DB_HOST=mariadb
|
|
- OWNCLOUD_MYSQL_UTF8MB4=true
|
|
- OWNCLOUD_REDIS_ENABLED=true
|
|
- OWNCLOUD_REDIS_HOST=redis
|
|
healthcheck:
|
|
test: ["CMD", "/usr/bin/healthcheck"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
volumes:
|
|
- /config/owncloud:/mnt/data
|
|
- /storage1/Books:/mnt/books
|
|
- /mnt/dropbox:/mnt/data/files/dropbox
|
|
- /storage1/ROMs:/mnt/roms
|
|
|
|
mariadb:
|
|
image: mariadb:12.3
|
|
container_name: owncloud_mariadb
|
|
restart: unless-stopped
|
|
labels:
|
|
- "com.centurylabs.watchtower.enable=false"
|
|
networks: [owncloud]
|
|
env_file:
|
|
- stack.env
|
|
environment:
|
|
- MYSQL_DATABASE=owncloud
|
|
command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
healthcheck:
|
|
# $$ defers expansion to container runtime (env_file supplies the value)
|
|
test: ["CMD-SHELL", "mariadb-admin ping -u root --password=\"$$MYSQL_ROOT_PASSWORD\""]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- /config/mysql:/var/lib/mysql
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: owncloud_redis
|
|
restart: unless-stopped
|
|
labels:
|
|
- "com.centurylabs.watchtower.enable=false"
|
|
networks: [owncloud]
|
|
command: ["--databases", "1"]
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- /config/redis:/data
|
|
|
|
networks:
|
|
owncloud:
|
|
name: owncloud
|
|
driver: bridge
|
|
edge:
|
|
name: edge
|
|
external: true
|