app-store/apps/owncloud/docker-compose.yml

103 lines
3.3 KiB
YAML
Raw Normal View History

2023-03-01 13:58:29 +00:00
version: "3"
services:
owncloud:
image: owncloud/server:10.14.0
2023-03-01 13:58:29 +00:00
container_name: owncloud
restart: unless-stopped
ports:
- ${APP_PORT}:8080
depends_on:
2023-03-01 22:28:54 +00:00
- owncloud-db
- owncloud-redis
2023-03-01 13:58:29 +00:00
environment:
- OWNCLOUD_DOMAIN=${APP_DOMAIN}
- OWNCLOUD_TRUSTED_DOMAINS=${APP_DOMAIN}
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_NAME=owncloud
- OWNCLOUD_DB_USERNAME=tipi
2023-03-01 22:28:54 +00:00
- OWNCLOUD_DB_PASSWORD=${OWNCLOUD_DB_PASSWORD}
- OWNCLOUD_DB_HOST=owncloud-db
- OWNCLOUD_ADMIN_USERNAME=${OWNCLOUD_USERNAME}
- OWNCLOUD_ADMIN_PASSWORD=${OWNCLOUD_PASSWORD}
2023-03-01 13:58:29 +00:00
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
2023-03-01 22:28:54 +00:00
- OWNCLOUD_REDIS_HOST=owncloud-redis
2023-03-01 13:58:29 +00:00
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ${APP_DATA_DIR}/data/owncloud:/mnt/data
2023-03-01 13:58:29 +00:00
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.owncloud-web-redirect.redirectscheme.scheme: https
traefik.http.services.owncloud.loadbalancer.server.port: 8080
# Web
traefik.http.routers.owncloud-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.owncloud-insecure.entrypoints: web
traefik.http.routers.owncloud-insecure.service: owncloud
traefik.http.routers.owncloud-insecure.middlewares: owncloud-web-redirect
# Websecure
2023-03-01 13:58:29 +00:00
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
# Local domain
traefik.http.routers.owncloud-local-insecure.rule: Host(`owncloud.${LOCAL_DOMAIN}`)
traefik.http.routers.owncloud-local-insecure.entrypoints: web
traefik.http.routers.owncloud-local-insecure.service: owncloud
traefik.http.routers.owncloud-local-insecure.middlewares: owncloud-web-redirect
# Local domain secure
traefik.http.routers.owncloud-local.rule: Host(`owncloud.${LOCAL_DOMAIN}`)
traefik.http.routers.owncloud-local.entrypoints: websecure
traefik.http.routers.owncloud-local.service: owncloud
traefik.http.routers.owncloud-local.tls: true
2023-03-01 13:58:29 +00:00
2023-03-01 22:28:54 +00:00
owncloud-db:
2023-03-01 13:58:29 +00:00
image: mariadb:10.6 # minimum required ownCloud version is 10.9
2023-03-01 22:28:54 +00:00
container_name: owncloud-db
2023-03-01 13:58:29 +00:00
restart: unless-stopped
environment:
2023-03-01 22:28:54 +00:00
- MYSQL_ROOT_PASSWORD=${OWNCLOUD_DB_PASSWORD}
2023-03-01 13:58:29 +00:00
- MYSQL_USER=tipi
2023-03-01 22:28:54 +00:00
- MYSQL_PASSWORD=${OWNCLOUD_DB_PASSWORD}
2023-03-01 13:58:29 +00:00
- MYSQL_DATABASE=owncloud
command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-u",
"root",
"--password=${OWNCLOUD_DB_PASSWORD}",
]
2023-03-01 13:58:29 +00:00
interval: 10s
timeout: 5s
retries: 5
volumes:
- ${APP_DATA_DIR}/data/mysql:/var/lib/mysql
networks:
- tipi_main_network
2023-03-01 22:28:54 +00:00
owncloud-redis:
2023-03-01 13:58:29 +00:00
image: redis:6
2023-03-01 22:28:54 +00:00
container_name: owncloud-redis
2023-03-01 13:58:29 +00:00
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