I would like to run nextcloud with postgres as a database and deploy that on my Qnap server. I have experimented with the nextcloud docker image and that works fine. Same with the postgresql docker image. Problems start when I try to connect it with a postgresql database. When I use nextcloud and postgresql in a docker-compose file I seem not to be able to have nextcloud use the postgresql database. Well, nextcloud keeps complaining I’m still using sqlite so it doesn’t see postgres. Fact is I do not understand how to organize nextcloud and postgres in docker in such a way that nextcloud ‘sees’ postgresql. Could someone help me out with this?
version: '3' volumes: nextcloud: services: db: image: postgres:10.12-alpine # use version 10.12 of postgres, still works with pgadmin3 restart: always ports: - '5433:5432' # expose 5433 on host and sent to 5432 in container volumes: - /share/files/dbms/pg-data-nextcloud:/var/lib/postgresql/data environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD="Hallo Postgres!" app: image: nextcloud restart: always ports: - 8082:80 volumes: - nextcloud:/var/www/html environment: - POSTGRES_HOST=db - POSTGRES_USER=postgres - POSTGRES_PASSWORD="Hallo Postgres!" depends_on: - db