Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create sqlite database file if it does not exist #386

Closed
wants to merge 1 commit into from

Conversation

fho
Copy link

@fho fho commented Oct 13, 2023

When a volume mount is used for /var/wwww/wallabag/data, as documented1, the container fails to start with the error messages:

wc: /var/www/wallabag/data/db/wallabag.sqlite: No such file or directory
Configuring the SQLite database ...
In ExceptionConverter.php line 76:
  An exception occurred in the driver: SQLSTATE[HY000] [14] unable to
  open database file
[..]

In the volume mount the db directory and the empty db/wallabag.sqlite do not exist which causes the issue.

Check in the entrypoint script if the file exist, if it does not create the db directory and the file and make nobody the owner.

This fixes: #316

Footnotes

  1. https://github.com/wallabag/docker/tree/96dd9bc3e3d12b216471db03f5afacd6d1afac61#sqlite

When a volume mount is used for /var/wwww/wallabag/data, as
documented[^1], the container fails to start with the error messages:

    wc: /var/www/wallabag/data/db/wallabag.sqlite: No such file or directory
    Configuring the SQLite database ...
    In ExceptionConverter.php line 76:
      An exception occurred in the driver: SQLSTATE[HY000] [14] unable to
      open database file
    [..]

In the volume mount the db directory and the empty db/wallabag.sqlite do
not exist which causes the issue.

Check in the entrypoint script if the file exist, if it does not create
the db directory and the file and make nobody the owner.

This fixes: wallabag#316

[^1]:https://github.com/wallabag/docker/tree/96dd9bc3e3d12b216471db03f5afacd6d1afac61#sqlite
@j0k3r j0k3r requested a review from Kdecherf October 13, 2023 09:52
@fho
Copy link
Author

fho commented Oct 25, 2023

@j0k3r, @Kdecherf any chance to get this merged?

@fho
Copy link
Author

fho commented Oct 30, 2023

A docker image containing the fix can be found here: https://github.com/fho/wallabag-docker/pkgs/container/wallabag. It will only be temporarily available.

@itsamenathan
Copy link

+1 as I just ran into this issue

@The-Loki-Project
Copy link

+1 ran into this issue, would love for it be fixed

@fho
Copy link
Author

fho commented Mar 5, 2024

@Kdecherf @j0k3r @nicosomb could you please provide feedback or even better merge this PR?

Kdecherf added a commit that referenced this pull request Mar 10, 2024
If we use a local folder volume binding, install_wallabag was failing
because of missing file and permission issues.

This reworks the way we initially create the database when it is missing
or empty.

Superseeds #386

Fixes #316 #346

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
@Kdecherf Kdecherf mentioned this pull request Mar 10, 2024
@Kdecherf
Copy link
Member

Hello @fho,

I finally took time to check on this issue, and I worked on a slightly different fix here #402

@Kdecherf
Copy link
Member

Superseded by #402

@Kdecherf Kdecherf closed this Mar 10, 2024
@fho fho deleted the fix_sqlite branch March 11, 2024 07:48
@fho
Copy link
Author

fho commented Mar 11, 2024

@Kdecherf thanks for merging a fix

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.

wallabag can't runing
4 participants