app-store/apps/owncloud/docker-compose.yml
2023-03-01 23:28:54 +01:00

77 lines
2.3 KiB
YAML

version: "3"
services:
owncloud:
image: owncloud/server:10.11.0
container_name: owncloud
restart: unless-stopped
ports:
- ${APP_PORT}:8080
depends_on:
- owncloud-db
- owncloud-redis
environment:
- OWNCLOUD_DOMAIN=${APP_DOMAIN}
- OWNCLOUD_TRUSTED_DOMAINS=${APP_DOMAIN}
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_NAME=owncloud
- OWNCLOUD_DB_USERNAME=tipi
- OWNCLOUD_DB_PASSWORD=${OWNCLOUD_DB_PASSWORD}
- OWNCLOUD_DB_HOST=owncloud-db
- OWNCLOUD_ADMIN_USERNAME=${OWNCLOUD_USERNAME}
- OWNCLOUD_ADMIN_PASSWORD=${OWNCLOUD_PASSWORD}
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=owncloud-redis
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ${APP_DATA_DIR}/data/owncloud:/mnt/data
networks:
- tipi_main_network
labels:
traefik.enable: ${APP_EXPOSED}
traefik.http.routers.owncloud.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.owncloud.entrypoints: websecure
traefik.http.routers.owncloud.service: owncloud
traefik.http.routers.owncloud.tls.certresolver: myresolver
traefik.http.services.owncloud.loadbalancer.server.port: 8080
owncloud-db:
image: mariadb:10.6 # minimum required ownCloud version is 10.9
container_name: owncloud-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${OWNCLOUD_DB_PASSWORD}
- MYSQL_USER=tipi
- MYSQL_PASSWORD=${OWNCLOUD_DB_PASSWORD}
- MYSQL_DATABASE=owncloud
command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-u", "root", "--password=${OWNCLOUD_DB_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ${APP_DATA_DIR}/data/mysql:/var/lib/mysql
networks:
- tipi_main_network
owncloud-redis:
image: redis:6
container_name: owncloud-redis
restart: unless-stopped
command: ["--databases", "1"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ${APP_DATA_DIR}/data/redis:/data
networks:
- tipi_main_network