1
5
Fork
You've already forked devops
3

docker-compose example does not work as-is #46

Closed
opened 2025年11月19日 14:33:54 +01:00 by OscarLundberg · 3 comments

i've been trying to get the docker-compose example running, but for whatever reason i can't get it to work.
https://codeberg.org/bookstack/devops/src/branch/main/config/lsio-docker/docker-compose.yml

I followed the link on https://www.bookstackapp.com/docs/admin/installation/ which led me here.

here are the steps i followed

  1. Create an empty directory and cd into it
  2. Create empty directories for the volumes mkdir bookstack_db_data and mkdir bookstack_app_data
  3. Create the file docker-compose.yml as linked above
  4. Paste in the file contents as linked above. Change only row 37 APP_KEY with the output from the command docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
  5. Run docker-compose up -d

resulting error (logs from bookstack container)

 SQLSTATE[HY000] [2002] Operation timed out (Connection: mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstack' and table_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as `exists`)
 at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:825
 821▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
 822▕ );
 823▕ }
 824▕ 
 ➜ 825▕ throw new QueryException(
 826▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
 827▕ );
 828▕ }
 829▕ }
 +38 vendor frames 
 39 /app/www/artisan:35
 Illuminate\Foundation\Console\Kernel::handle()

No visible errors from mariadb.

Not sure if i'm missing anything but I would expect the example to work as-is.
using synology dsm fwiw

i've been trying to get the docker-compose example running, but for whatever reason i can't get it to work. https://codeberg.org/bookstack/devops/src/branch/main/config/lsio-docker/docker-compose.yml I followed the link on https://www.bookstackapp.com/docs/admin/installation/ which led me here. here are the steps i followed 1. Create an empty directory and cd into it 2. Create empty directories for the volumes `mkdir bookstack_db_data` and `mkdir bookstack_app_data` 3. Create the file `docker-compose.yml` as linked above 4. Paste in the file contents as linked above. Change **only** row 37 `APP_KEY` with the output from the command `docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey` 5. Run `docker-compose up -d` resulting error (logs from bookstack container) ``` SQLSTATE[HY000] [2002] Operation timed out (Connection: mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'bookstack' and table_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as `exists`) at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:825 821▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 822▕ ); 823▕ } 824▕ ➜ 825▕ throw new QueryException( 826▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 827▕ ); 828▕ } 829▕ } +38 vendor frames 39 /app/www/artisan:35 Illuminate\Foundation\Console\Kernel::handle() ``` No visible errors from mariadb. Not sure if i'm missing anything but I would expect the example to work as-is. using synology dsm fwiw
Owner
Copy link

Hi @OscarLundberg,

Can you try:

  • Stop all containers and remove any of the existing volume directories for this stack.
  • Start just the mariadb service via compose. Check the logs for the started database container to ensure it has started up without error.
  • Then start the bookstack service also.

Helps rule out any potential timing issues.

Hi @OscarLundberg, Can you try: - Stop all containers and remove any of the existing volume directories for this stack. - Start just the mariadb service via compose. Check the logs for the started database container to ensure it has started up without error. - Then start the bookstack service also. Helps rule out any potential timing issues.

I could try it that way, although I did already try to delete only the bookstack container and volume dir, and then re-run docker-compose up -d. I could see that mariadb was not recreated and was up and running when bookstack started, but I had the same error occur again.

I also tried to connect manually via mysql command, from the bookstack container to mariadb, and it seemed to just time out there too. I tried to ping mariadb and it resolved the IP but I got no packets back (that may be expected though, idk)

If you can't reproduce it it's probably some nonstandard network thing on my end, but other compose projects without any network config seem to work, tried wiki.js now for example (also has an app service and a db service, albeit postgres) and it seems to be running fine

I could try it that way, although I did already try to delete only the bookstack container and volume dir, and then re-run `docker-compose up -d`. I could see that mariadb was not recreated and was up and running when bookstack started, but I had the same error occur again. I also tried to connect manually via `mysql` command, from the bookstack container to mariadb, and it seemed to just time out there too. I tried to ping mariadb and it resolved the IP but I got no packets back (that may be expected though, idk) If you can't reproduce it it's probably some nonstandard network thing on my end, but other compose projects without any network config seem to work, tried wiki.js now for example (also has an app service and a db service, albeit postgres) and it seems to be running fine

Found this
https://www.reddit.com/r/synology/comments/sofxgf/having_trouble_with_docker_container_networking/
apparently DSM firewall interferes with docker networking, so this is not a fault of bookstack.

for the record wiki.js did have the same issue, it just failed more silently and allowed me to start up and log me in without the DB connection.

Found this https://www.reddit.com/r/synology/comments/sofxgf/having_trouble_with_docker_container_networking/ apparently DSM firewall interferes with docker networking, so this is not a fault of bookstack. for the record wiki.js _did_ have the same issue, it just failed more silently and allowed me to start up and log me in without the DB connection.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bookstack/devops#46
Reference in a new issue
bookstack/devops
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?