Hello,
I am trying to run Kanboard inside docker with Postgres DB, but it always show in the settings that it is using sqlite. I am doinig something wrong, but I cannot figure out what.
My .env file (password is a fake):
POSTGRES_PASSWORD=myVeryStrongPassword
DATABASE_URL=postgres://kanboard:myVeryStrongPassword@db:5432/kanboard
Here is my docker-compose file:
---
version: '3'
networks:
web:
external: true
services:
db:
image: postgres:10-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=kanboard
- POSTGRES_USER=kanboard
env_file:
- ".env"
volumes:
- "${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-kanboard}/db:/var/lib/postgresql/data"
- "./sql/postgres.sql:/docker-entrypoint-initdb.d/initdb.sql"
app:
image: kanboard/kanboard:latest
restart: unless-stopped
environment:
- ".env"
volumes:
- "${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-kanboard}/app/data:/var/www/app/data"
- "${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-kanboard}/app/plugins:/var/www/app/plugins"
labels:
traefik.enable: 'true'
traefik.frontend.rule: 'Host: ${CHATONS_SERVICE:-kanboard}.${CHATONS_DOMAIN:-localhost},
www.${CHATONS_SERVICE:-kanboard}.${CHATONS_DOMAIN-localhost}'
networks:
- default
- web
I have in the sql
directory the postgres.sql
file which is coming from kanboard/app/Schema/Sql/postgres.sql
Any idea on what I am doing wrong ?
Documentation is only containing example for MariaDB. I’ll update the documentation to add a Postgres example when found.
Edit:
If i create a file /var/www/app/data/config.php
with the following content:
define('DB_DRIVER', 'postgres');
define('DB_USERNAME', 'kanboard');
define('DB_PASSWORD', 'myVeryStrongPassword');
define('DB_HOSTNAME', 'db');
define('DB_NAME', 'kanboard');
define('DB_PORT', null);
Then it works.
I thought that setting DATABASE_URL
was enough.
Any explanation ?