Browse Source

[Cloud] workaround database creation

The postgres container creates the database, but the nextcloud installer
wants ton create the DB itself…
So we have to tell to postgres to create a dummy DB.

ref https://github.com/nextcloud/docker/issues/456
Guilhem Saurel 6 years ago
parent
commit
e09152faf1
2 changed files with 4 additions and 1 deletions
  1. 0 1
      cloud/README.md
  2. 4 0
      cloud/docker-compose.yml

+ 0 - 1
cloud/README.md

@@ -5,7 +5,6 @@ https://nextcloud.com/
 ## Configure
 ```
 echo POSTGRES_PASSWORD=$(openssl rand -base64 32) >> .env
-echo POSTGRES_DB=nextcloud >> .env
 echo POSTGRES_USER=nextcloud >> .env
 echo POSTGRES_HOST=db >> .env
 ```

+ 4 - 0
cloud/docker-compose.yml

@@ -8,6 +8,8 @@ services:
   db:
     image: postgres:10-alpine
     restart: unless-stopped
+    environment:
+      - POSTGRES_DB=workaround  # nextcloud wants to create the db itself
     env_file:
       - .env
     volumes:
@@ -16,6 +18,8 @@ services:
   app:
     image: nextcloud:fpm-alpine
     restart: unless-stopped
+    environment:
+      - POSTGRES_DB=nextcloud
     env_file:
       - .env
     volumes: