Docker fresh install failing with Postrgesql DB
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 57/100
Research direction
Start by reading the Docker image startup and database configuration scripts, then check how they create or configure the PostgreSQL database and schema for PostgreSQL 16. The logs show migrations fail when creating migration_versions because access to schema public is denied. Done means a fresh PostgreSQL 16 install completes migrations successfully; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Description
Environment
- Version: 2.6.14
- Installation: docker
- PHP version: 8.1
- OS: docker image
- Database: Postgresql 16
- Configuration:
Relevant environment variables
Passwords and domain are fake
POSTGRES_PASSWORD=myPostgresPassword
SYMFONY__ENV__DATABASE_PASSWORD=myDBPassword
SYMFONY__ENV__SECRET=mySecret
SYMFONY__ENV__MAILER_HOST=mail.domain.com
[email protected]
[email protected]
SYMFONY__ENV__MAILER_PASSWORD=myMailPassword
docker-compose.yml
---
networks:
web:
external: true
services:
wallabag:
image: wallabag/wallabag:latest
restart: unless-stopped
environment:
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
- SYMFONY__ENV__DATABASE_DRIVER_CLASS=Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=5432
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__FOSUSER_REGISTRATION=false
- SYMFONY__ENV__LOCALE=fr
- SYMFONY__ENV__DOMAIN_NAME=https://bag.domain.com
- POSTGRES_USER=postgres
env_file:
- ".env"
volumes:
- "/srv/domain.com/bag/images:/var/www/wallabag/web/assets/images"
- "/srv/domain.com/bag//data:/var/www/wallabag/data"
labels:
traefik.enable: 'true'
traefik.http.routers.bag.rule: Host(`bag.domain.com`)
traefik.http.middlewares.bag-headers.headers.frameDeny: 'true'
traefik.http.routers.bag.middlewares: bag-headers@docker
networks:
- default
- web
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=workaround
- POSTGRES_USER=postgres
env_file:
- ".env"
volumes:
- "/srv/domain.com/bag/db:/var/lib/postgresql/data"
networks:
- default
redis:
image: redis:alpine
restart: unless-stopped
- Launch wallabag with
docker compose up -d - You get the following error in the logs
wallabag-1 | Starting wallabag ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Waiting for database ...
wallabag-1 | Configuring the Postgres database ...
wallabag-1 |
wallabag-1 | wallabag installer
wallabag-1 | ==================
wallabag-1 |
wallabag-1 | Step 1 of 4: Checking system requirements.
wallabag-1 | ------------------------------------------
wallabag-1 |
wallabag-1 | ------------------------ -------- ----------------
wallabag-1 | Checked Status Recommendation
wallabag-1 | ------------------------ -------- ----------------
wallabag-1 | PDO Driver (pdo_pgsql) OK!
wallabag-1 | Database connection OK!
wallabag-1 | Database version OK!
wallabag-1 | curl_exec OK!
wallabag-1 | curl_multi_init OK!
wallabag-1 | ------------------------ -------- ----------------
wallabag-1 |
wallabag-1 | [OK] Success! Your system can run wallabag properly.
wallabag-1 |
wallabag-1 | Step 2 of 4: Setting up database.
wallabag-1 | ---------------------------------
wallabag-1 |
wallabag-1 | Creating schema...
wallabag-1 |
wallabag-1 | In InstallCommand.php line 364:
wallabag-1 |
wallabag-1 | The command "doctrine:migrations:migrate" generates some errors:
wallabag-1 |
wallabag-1 | 14:55:08 CRITICAL [console] Error thrown while running command "doctrine:m
wallabag-1 | igrations:migrate --no-interaction=1 --no-debug=1 --env=prod". Message: "An
wallabag-1 | exception occurred while executing a query: SQLSTATE[42501]: Insufficient
wallabag-1 | privilege: 7 ERROR: permission denied for schema public
wallabag-1 | LINE 1: CREATE TABLE migration_versions (version VARCHAR(192) NOT NU...
wallabag-1 | ^" ["exception" => Doctrine\DBAL\Exception\DriverExcep
wallabag-1 | tion { …},"command" => "doctrine:migrations:migrate --no-interaction=1 --no
wallabag-1 | -debug=1 --env=prod","message" => """ An exception occurred while executin
wallabag-1 | g a query: SQLSTATE[42501]: Insufficient privilege: 7 ERROR: permission de
wallabag-1 | nied for schema public\n LINE 1: CREATE TABLE migration_versions (version
wallabag-1 | VARCHAR(192) NOT NU...\n ^ """]
wallabag-1 |
wallabag-1 | In ExceptionConverter.php line 87:
wallabag-1 |
wallabag-1 |
wallabag-1 | An exception occurred while executing a query: SQLSTATE[42501]: Insuffici
wallabag-1 | en
wallabag-1 | t privilege: 7 ERROR: permission denied for schema public
wallabag-1 |
wallabag-1 | LINE 1: CREATE TABLE migration_versions (version VARCHAR(192) NOT NU...
wallabag-1 |
wallabag-1 | ^
wallabag-1 |
wallabag-1 |
wallabag-1 |
wallabag-1 |
wallabag-1 | In Exception.php line 24:
wallabag-1 |
wallabag-1 |
wallabag-1 | SQLSTATE[42501]: Insufficient privilege: 7 ERROR: permission denied for
wallabag-1 | sc
wallabag-1 | hema public
wallabag-1 |
wallabag-1 | LINE 1: CREATE TABLE migration_versions (version VARCHAR(192) NOT NU...
wallabag-1 |
wallabag-1 | ^
wallabag-1 |
wallabag-1 |
wallabag-1 |
wallabag-1 |
wallabag-1 | In Connection.php line 33:
wallabag-1 |
wallabag-1 |
wallabag-1 | SQLSTATE[42501]: Insufficient privilege: 7 ERROR: permission denied for
wallabag-1 | sc
wallabag-1 | hema public
wallabag-1 |
wallabag-1 | LINE 1: CREATE TABLE migration_versions (version VARCHAR(192) NOT NU...
wallabag-1 |
wallabag-1 | ^
wallabag-1 |
wallabag-1 |
wallabag-1 |
wallabag-1 |
wallabag-1 | doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-
wallabag-1 | time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configu
wallabag-1 | ration CONFIGURATION] [--em EM] [--conn CONN] [-h|--help] [-q|--quiet] [-v|
wallabag-1 | vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction]
wallabag-1 | [-e|--env ENV] [--no-debug] [--] <command> [<version>]
wallabag-1 |
wallabag-1 |
wallabag-1 | doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<version>]
After some search on internet, my guess is that this is linked to the new behavior starting with Postgresql 15 as explained in the Stackoverflow answer
My knowledge is not sufficient to be able to fix it. Any hint would be welcome to try and test a workaround.
Additional info:
- running
docker compose exec wallabag /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interactionraises the same error
- Dominant language
- Shell
- Stars
- 771
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wallabag/docker
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Awaiting response
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
数据界面的横向滚动条缺失Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zilliztech/attu#1037 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
good first issue tests
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
alunduil/alunduil-chezmoi#964 ·
Maintainers usually reply within 1 day
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day