Browse Source

artisan koel:init when configuring pgsql: could not find driver

Fabian Peter Hammerle 5 years ago
commit
1990d20290
2 changed files with 46 additions and 0 deletions
  1. 19 0
      Dockerfile
  2. 27 0
      README.md

+ 19 - 0
Dockerfile

@@ -0,0 +1,19 @@
+FROM alpine:3.8
+
+RUN apk add git composer php7-exif php7-fileinfo php7-simplexml php7-pdo php7-curl php7-zip php7-tokenizer php7-iconv php7-dom php7-xmlwriter php7-xml
+
+RUN git clone --branch master https://github.com/phanan/koel /koel
+
+RUN apk add php7-session
+
+WORKDIR /koel
+
+RUN composer install --no-scripts --no-interaction
+
+# In Encrypter.php line 43:
+# The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
+RUN sed 's/^APP_KEY=$/APP_KEY=WORKAROUND_000000000000000000000/' .env.example >.env
+
+RUN apk add php7-pgsql
+
+RUN composer install

+ 27 - 0
README.md

@@ -0,0 +1,27 @@
+```sh
+$ sudo docker build -t koel .
+$ sudo docker run --rm --name koel-db --interactive --tty \
+    --env POSTGRES_USER=koel --env POSTGRES_PASSWORD=secret \
+    --network koel --security-opt=no-new-privileges \
+    --cap-drop=all --cap-add=chown --cap-add=setuid --cap-add=setgid --cap-add=fowner \
+    postgres:10.5-alpine
+$ sudo docker run --rm --interactive --tty --network koel --publish=8000:8000 \
+    --security-opt=no-new-privileges --cap-drop=all koel
+/koel # php artisan koel:init
+...
+Koel cannot connect to the database. Let's set it up.
+
+ Your DB driver of choice [MySQL/MariaDB]:
+  [mysql     ] MySQL/MariaDB
+  [pgsql     ] PostgreSQL
+  [sqlsrv    ] SQL Server
+  [sqlite-e2e] SQLite
+ > pgsql
+
+ DB host:
+ > koel
+
+ ...
+
+could not find driver
+```