77 lines
2.5 KiB
YAML
77 lines
2.5 KiB
YAML
# Nextcloud Server (stable) with MariaDB LTS
|
|
#
|
|
services:
|
|
# https://hub.docker.com/_/nextcloud
|
|
# https://github.com/docker-library/docs/tree/master/nextcloud
|
|
# https://github.com/nextcloud/server
|
|
nextcloud:
|
|
image: nextcloud:stable-apache
|
|
# Database must be accessible.
|
|
depends_on:
|
|
database:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
# Take a look the possible public port collision.
|
|
ports:
|
|
- 8201:80
|
|
links:
|
|
- database
|
|
volumes:
|
|
# Needs R/O UID:GID 33:33 (www-data:www-data).
|
|
- ./storage/volumes/nextcloud_init_d:/docker-entrypoint-hooks.d:ro
|
|
# Needs R/W UID:GID 33:33 (www-data:www-data).
|
|
- ./storage/volumes/nextcloud_html:/var/www/html
|
|
- ./storage/volumes/nextcloud_data:/wtkclouddata
|
|
environment:
|
|
MYSQL_HOST: database
|
|
MYSQL_DATABASE: nextcloud
|
|
MYSQL_USER: nextcloud
|
|
# Same as in MariaDB's configuration.
|
|
MYSQL_PASSWORD: secret-1
|
|
NEXTCLOUD_ADMIN_USER: admin
|
|
# E.g. https://www.avast.com/random-password-generator
|
|
NEXTCLOUD_ADMIN_PASSWORD: secret-3
|
|
# Fill in according to local settings.
|
|
#NEXTCLOUD_TRUSTED_DOMAINS: example.com, cloud.example.com
|
|
# These are required behind a reverse proxy.
|
|
APACHE_DISABLE_REWRITE_IP: 1
|
|
# Feel free to adapt to your Docker environment.
|
|
TRUSTED_PROXIES: 172.16.0.0/12
|
|
# If you force https on the reverse proxy (which is recommended).
|
|
#OVERWRITEPROTOCOL: https
|
|
# Optional context path.
|
|
#OVERWRITEWEBROOT: /nextcloud
|
|
# PHP settings.
|
|
PHP_MEMORY_LIMIT: 1024M
|
|
PHP_UPLOAD_LIMIT: 1024M
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: true
|
|
#
|
|
# https://hub.docker.com/_/mariadb
|
|
database:
|
|
image: mariadb:lts
|
|
restart: unless-stopped
|
|
# Only for migration or debugging.
|
|
#ports:
|
|
# - 3306:3306
|
|
volumes:
|
|
# Needs R/W UID:GID 999:999.
|
|
- ./storage/volumes/mysql:/var/lib/mysql
|
|
# Needs read UID 999.
|
|
- ./storage/volumes/mysql_conf_d:/etc/mysql/conf.d
|
|
- ./storage/volumes/mysql_init_d:/docker-entrypoint-initdb.d
|
|
environment:
|
|
MARIADB_AUTO_UPGRADE: "1"
|
|
MARIADB_INITDB_SKIP_TZINFO: "1"
|
|
MYSQL_DATABASE: nextcloud
|
|
MYSQL_USER: nextcloud
|
|
# E.g. https://www.avast.com/random-password-generator
|
|
MYSQL_PASSWORD: secret-1
|
|
MYSQL_ROOT_PASSWORD: secret-2
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: true
|