Skip to content

Modify Database Existence Check in entrypoint.sh#475

Open
sebtiz13 wants to merge 1 commit intowallabag:masterfrom
sebtiz13:fix/init-postgresql
Open

Modify Database Existence Check in entrypoint.sh#475
sebtiz13 wants to merge 1 commit intowallabag:masterfrom
sebtiz13:fix/init-postgresql

Conversation

@sebtiz13
Copy link

In the current implementation, when using a PostgreSQL database, most Docker containers create the database and the associated user role. This leads to the DATABASE_EXISTS test in entrypoint.sh always evaluating to true, causing Wallabag to not be installed properly.

To address this issue, I propose modifying the test to check if the tables exist instead of just checking if the database exists.

Changes

  1. DATABASE_EXISTS only handle the database and role creation
  2. Add the TABLES_EXISTS test in entrypoint.sh to check if the tables exist.
  3. If tables not exists run install_wallabag function

Testing

  • Tested with PostgreSQL database.
  • Verified that Wallabag is installed properly after the changes.

Related Issues

#412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant