Adding nextcloud

This commit is contained in:
Siina Mashek 2024-02-03 22:54:26 +00:00
parent 47a3e1b602
commit 15a9f86f41
2 changed files with 37 additions and 0 deletions

5
nextcloud/.env-example Normal file
View file

@ -0,0 +1,5 @@
BASE_DATA_DIR=$HOME/docker_data
POSTGRES_PASSWORD=
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_HOST=

View file

@ -0,0 +1,32 @@
version: '3.5'
services:
nextcloud:
container_name: nextcloud
image: nextcloud:latest
restart: always
ports:
- 8080:80
volumes:
- ${BASE_DATA_DIR}/nextcloud/app:/var/www/html
- ${BASE_DATA_DIR}/nextcloud/data:/var/www/html/data
- ${BASE_DATA_DIR}/nextcloud/config:/var/www/html/config
environment:
- POSTGRES_HOST=nextcloud-db
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
depends_on:
- db
db:
image: postgres
restart: always
hostname: nextcloud-db
volumes:
- ${BASE_DATA_DIR}/nextcloud/postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}