So I’m trying to deploy nextcloud on my docker host.
I defined 2 volumes, one for DB and one for the nextcloud config that are mapped to a folder on my NAS but I keep getting write error.
In my nas write access is configured, when I go into the console of the docker I can also write a test file into the config folder (touch test) so I’m unsure what the exact issue is
Error page says:
Can’t write into config directory!
This can usually be fixed by giving the webserver write access to the config directory.
This is my docker-compose.yml file:
version: ‘3.2’
services:
nextcloud-db:
image: postgres
container_name: nextcloud-db
restart: always
volumes:
- nextcloud-db:/var/lib/postgresql/data
environment:
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
secrets:
- postgres_db
- postgres_password
- postgres_user
app:
image: nextcloud
restart: always
container_name: nextcloud
ports:
- 8080:80
privileged: true
volumes:
- nextcloud:/var/www/html
environment:
- POSTGRES_HOST=nextcloud-db
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
- NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
depends_on:
- nextcloud-db
secrets:
- nextcloud_admin_password
- nextcloud_admin_user
- postgres_db
- postgres_password
- postgres_user
volumes:
nextcloud-db:
name: nextcloud-db
driver_opts:
type: nfs
o: addr=10.10.10.80,nolock,soft,rw
device: :/Nextcloud/db
nextcloud:
name: nextcloud
driver_opts:
type: nfs
o: addr=10.10.10.80,nolock,soft,rw
device: :/Nextcloud/nextcloud
secrets:
nextcloud_admin_password:
file: ./nextcloud_admin_password.txt # put admin password in this file
nextcloud_admin_user:
file: ./nextcloud_admin_user.txt # put admin username in this file
postgres_db:
file: ./postgres_db.txt # put postgresql db name in this file
postgres_password:
file: ./postgres_password.txt # put postgresql password in this file
postgres_user:
file: ./postgres_user.txt # put postgresql username in this file
networks:
default:
external:
name: HomeBridge