wallabag / docker

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

Unable to start with a volume #383

Closed ajkessel closed 1 year ago

ajkessel commented 1 year ago

Following the instructions in readme to start with a volume, when I run

docker run -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallaba
g/web/assets/images -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://(mydomain)" wallabag/wallabag

I get

Starting wallabag ...
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 da
  tabase file

In Exception.php line 28:

  SQLSTATE[HY000] [14] unable to open database file

In Driver.php line 44:

  SQLSTATE[HY000] [14] unable to open database file

The /opt folders exist and are writeable. When am I doing wrong?

ajkessel commented 1 year ago

Turns out this was a permissions error. Apparently my output directory did not have write permissions for nobody. Perhaps worth updating documentation to clarify that the user needs to create directories with appropriate permissions, or perhaps modify docker compose file.

Draky50110 commented 7 months ago

Which user is ok to use the file database.sqlite ? Got the same problem : docker-compose creates the directory "data" but seems to not create "db" dir and file "database.sqlite".