media-server-docker-compose/nextcloud/docker-compose.yml
2024-06-23 12:21:53 -04:00

46 lines
1.2 KiB
YAML

services:
redis:
# user: "${UID}:${GID}"
image: redis:alpine
container_name: redis-dbcache
restart: unless-stopped
db:
image: mysql:latest
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW --log_bin_trust_function_creators=true
# user: ${UID}:${GID}
volumes:
- ${DB_LOCATION}:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD
- MYSQL_PASSWORD=${DBPASS}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
nextcloud:
image: nextcloud:29.0.0
container_name: nextcloud
# user: "${UID}:${GID}"
depends_on:
- db
links:
- db
environment:
TZ: "${TZ}"
VIRTUAL_HOST: "nextcloud.${DOMAIN}"
MYSQL_HOST: db
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: ${DBPASS}
REDIS_HOST: redis
LETSENCRYPT_HOST: nextcloud.${DOMAIN}
LETSENCRYPT_EMAIL: ${EMAIL}
# LETSENCRYPT_TEST: true
volumes:
- ${CONFIG_LOCATION}:/var/www/html/config:rw
- ${DATA_LOCATION}/Cloud/Nextcloud:/var/www/html/data:rw
restart: unless-stopped
networks:
default:
name: nginx-proxy
external: true