wallabag / docker

Official docker-composer for wallabag.
572 stars 150 forks source link

create sqlite database file if it does not exist #386

Closed fho closed 4 months ago

fho commented 8 months ago

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: https://github.com/wallabag/docker/issues/316

fho commented 8 months ago

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

fho commented 8 months ago

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 commented 5 months ago

+1 as I just ran into this issue

The-Loki-Project commented 5 months ago

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

fho commented 4 months ago

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

Kdecherf commented 4 months ago

Hello @fho,

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

Kdecherf commented 4 months ago

Superseded by #402

fho commented 3 months ago

@Kdecherf thanks for merging a fix