From eb89c6c725aaf25a4bd75786fc7ff7acb5aed004 Mon Sep 17 00:00:00 2001 From: Brandon Egger Date: Sat, 8 Jun 2024 17:25:48 -0500 Subject: [PATCH] add nextcloud config --- docker/nextcloud/.env.example | 35 +++++++++++++++++++++ docker/nextcloud/docker-compose.yml | 47 +++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 docker/nextcloud/.env.example create mode 100644 docker/nextcloud/docker-compose.yml diff --git a/docker/nextcloud/.env.example b/docker/nextcloud/.env.example new file mode 100644 index 0000000..ab49d95 --- /dev/null +++ b/docker/nextcloud/.env.example @@ -0,0 +1,35 @@ +###################################### +# Postgres Configuration +###################################### +POSTGRES_HOST=db +POSTGRES_DB=nextcloud +POSTGRES_USER=nextcloud +POSTGRES_PASSWORD= +POSTGRES_VOLUME_PATH= # Path to store postgres data + +###################################### +# Nextcloud Configuration +###################################### +NEXTCLOUD_VOLUME_PATH= # Path to store nextcloud data + +# I have provided these with the default values, however I recommend increasing these as needed +PHP_MEMORY_LIMIT=512M +PHP_UPLOAD_LIMIT=512M + +# For SMTP - I use private email: https://www.namecheap.com/support/knowledgebase/article.aspx/1179/2175/general-private-email-configuration-for-mail-clients-and-mobile-devices/ +# Note: At least SMTP_HOST, MAIL_FROM_ADDRESS and MAIL_DOMAIN must be set for the configurations to be applied. +SMPT_HOST= +SMPT_SECURE=ssl +SMTP_PORT= +SMTP_AUTHTYPE=LOGIN +SMTP_NAME= # username +SMTP_PASSWORD= +MAIL_FROM_ADDRESS= +MAIL_DOMAIN= + +###################################### +# Redis Configuration +###################################### +REDIS_HOST=cache +REDIS_HOST_PORT=6379 +REDIS_HOST_PASSWORD= diff --git a/docker/nextcloud/docker-compose.yml b/docker/nextcloud/docker-compose.yml new file mode 100644 index 0000000..19bd7c9 --- /dev/null +++ b/docker/nextcloud/docker-compose.yml @@ -0,0 +1,47 @@ +services: + db: + image: postgres:16 + restart: always + volumes: + - ${POSTGRES_VOLUME_PATH}:/var/lib/postgresql/data + environment: + - POSTGRES_DB + - POSTGRES_USER + - POSTGRES_PASSWORD + + cache: + image: redis:7.2.5-alpine + restart: always + command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_HOST_PASSWORD} + volumes: + - cache:/data + + app: + image: nextcloud + restart: always + ports: + - 8080:80 + volumes: + - ${NEXTCLOUD_VOLUME_PATH}:/var/www/html + environment: + - POSTGRES_HOST + - POSTGRES_DB + - POSTGRES_USER + - POSTGRES_PASSWORD + - PHP_MEMORY_LIMIT + - PHP_UPLOAD_LIMIT + - SMTP_HOST + - SMTP_AUTHTYPE + - SMTP_NAME + - SMTP_PASSWORD + - MAIL_FROM_ADDRESS + - MAIL_DOMAIN + - REDIS_HOST + - REDIS_HOST_PORT + - REDIS_HOST_PASSWORD + depends_on: + - db + - cache + +volumes: + cache: