Code Monkey home page Code Monkey logo

docker-bookstack's Introduction

Docker Image For BookStack

Build Status Latest release GitHub contributors

Changes

Users of version 24.2.3 should switch to 24.2.3-1 (or higher); a maintainer erroneously set image tag 24.2.3 to use 23.2.3 as the release.

Versions higher than 23.6.2 no longer use an in-container .env file for environment variable management. Instead, the preferred approach is to manage them directly with the container runtime (e.g. Docker's -e). This is to simplify troubleshooting if and when errors occur. The most important change is that ${APP_KEY} is no longer provided for you, instead it is up to the operator to ensure this value is present. Versions prior to this supplied ${APP_KEY} (with a default of SomeRandomStringWith32Characters. A full reference of available environment variables is available in the Bookstack repository

The version 23.6.0 is broken due to a bad .env configuration created by the entrypoint script. This is fixed in version 23.6.0-1.

In 0.28.0 we changed the container http port from 80 to 8080 to allow root privileges to be dropped

In 0.12.2 we removed DB_PORT . You can now specify the port via DB_HOST like DB_HOST=mysql:3306

Quickstart

With Docker Compose is a Quickstart very easy. Run the following command:

docker-compose up

and after that open your Browser and go to http://localhost:8080 . You can login with username [email protected] and password password.

Issues

If you have any issues feel free to create an issue on GitHub.

How to use the Image without Docker compose

Note that if you want to use LDAP, $ has to be escape like \$, i.e. -e "LDAP_USER_FILTER"="(&(uid=\${user}))"

Networking changed in Docker v1.9, so you need to do one of the following steps.

Docker < v1.9

  1. MySQL Container:

    docker run -d \
    -p 3306:3306 \
    -e MYSQL_ROOT_PASSWORD=secret \
    -e MYSQL_DATABASE=bookstack \
    -e MYSQL_USER=bookstack \
    -e MYSQL_PASSWORD=secret \
    --name bookstack_db \
    mysql:5.7.21
  2. BookStack Container:

    docker run -d --link bookstack_db_:mysql \
    -p 8080:8080 \
    --name bookstack_24.2.3 \
    solidnerd/bookstack:24.2.3-1

Docker 1.9+

  1. Create a shared network:

    docker network create bookstack_nw
  2. Run MySQL container :

    docker run -d --net bookstack_nw  \
    -e MYSQL_ROOT_PASSWORD=secret \
    -e MYSQL_DATABASE=bookstack \
    -e MYSQL_USER=bookstack \
    -e MYSQL_PASSWORD=secret \
     --name="bookstack_db" \
     mysql:5.7.21
  3. Run BookStack Container

    docker run -d --net bookstack_nw \
    -e DB_HOST=bookstack_db:3306 \
    -e DB_DATABASE=bookstack \
    -e DB_USERNAME=bookstack \
    -e DB_PASSWORD=secret \
    -e APP_URL=http://example.com \
    -p 8080:8080 \
    --name="bookstack_24.2.3" \
     solidnerd/bookstack:24.2.3-1

    The APP_URL parameter should be the base URL for your BookStack instance without a trailing slash. For example:

    APP_URL=http://example.com

    The following environment variables are required for Bookstack to start:

    • APP_KEY
    • APP_URL
    • DB_HOST (in the form ${hostname_or_ip_address}:${port})
    • DB_DATABASE
    • DB_USERNAME
    • DB_PASSWORD

Volumes

To access your .env file and important bookstack folders on your host system change <HOST> in the following line to your host directory and add it then to your run command:

--mount type=bind,source=<HOST>/.env,target=/var/www/bookstack/.env \
-v <HOST>:/var/www/bookstack/public/uploads \
-v <HOST>:/var/www/bookstack/storage/uploads

In case of a windows host machine the .env file has to be already created in the host directory otherwise a folder named .env will be created.

After these steps you can visit http://localhost:8080. You can login with username [email protected] and password password.

Inspiration

This is a fork of Kilhog/docker-bookstack. Kilhog did the intial work, but I want to go in a different direction.

docker-bookstack's People

Contributors

amchelmer avatar andremohr avatar beckerfelix avatar christophert avatar dependabot[bot] avatar dionysiusmarquis avatar falconray0704 avatar ig12 avatar jcwimer avatar jeremybolster avatar jhenneberg avatar joshuaavalon avatar joshuakraitberg avatar kilhog avatar ltdan79 avatar mtib avatar pschmitt avatar pwilken avatar reddexx avatar renovate-bot avatar renovate[bot] avatar rjhenry avatar rounakdatta avatar shuaiscott avatar solidnerd avatar ssddanbrown avatar sysreport avatar tetra-info avatar tylwright avatar weasy666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-bookstack's Issues

The instructions should mention setting the APP_URL parameter

Thanks for creating this, it has been a big help to me.

I have a suggestion, I followed the instructions and got bookstack up and running fine. The image export for HTML and PDF however didn't work.

I put in an issue to the bookstack repo and they mentioned that I need to set the APP_URL parameter. Once I did this in the docker-compose.yml file, it worked perfectly.

It would be good if the setup instructions in the readme file mentioned that this should be set.

This is the other issue, which has more details on the issue:
BookStackApp/BookStack#799

Error in MySQL host env var in run command

This was originally posted on the Docker Hub page by acsandeep. Posting it here as well for more visibility.

The run command in the readme file for Docker 1.9 and up includes

-e DB_HOST=bookstack_db:3306 \

However, the variable only needs the name of the host, not the port. The program appends the port when running, so you end up with a

SQLSTATE[HY000] [2002] Failed to parse address "bookstack_db:3306:3306"

127.0.01:8080 redirection

Hi,

I installed Bookstack via docker-compose and it works locally.
But I tried to setup the solution on a server and a nginx proxy in order to user 443 port. It worked.

The problem is that, when I want to log into the application, I am redirected to http://127.0.0.1:8080 and not https://wiki.mydomain.com.

Next, if I retry to connect to https://wiki.mydomain.com, I'm logged and I can create book, pages, etc ...

Can you tell me how to always stay on https://wiki.mydomain.com please ?

Thanks

Failed to save draft.

Hello, I followed the instructions to install docker-bookstack and I got the following error when I tried to fill content of a page.

Failed to save draft. Ensure you have internet connection before saving this page.

How do I fix this issue?

Container doesn't write uploads to mapped storage volume

First of all thanks for creating this container.

I started using this container some days ago. Today I had to restart my docker infrastructure and had to realize, that all my uploaded documents were gone. I inspected my host volumes and saw, that the mapped storage folder was empty. The uploads folder on the other side was ok.

My setup is as follows:

  • OS: Windows 10, Docker: 18.03.0, Compose: 1.20.1
  • I took the declared services from the project's docker-compse.yml (v2) and integrated them in my docker-compose (v3) file.
  • Instead of mounting the declared bookstack volumes to a docker volume I defined two volumes on the host.
  volumes:
    - C:/Users/someuser/docker-data/bookstack/uploads:/var/www/bookstack/public/uploads
    - C:/Users/someuser/docker-data/bookstack/storage:/var/www/bookstack/public/storage

As a first attempt, I tried to mount the storage folder to a docker volume, but had the same problem again.

I don't know what I am doing wrong. Maybe someone had the same problem before and found a solution or workaround.

Thanks in advance

Upgrade to New version of bookstack when using docker container?

I have my bookstack up and running fine but im using 0.16.2 verison of bookstack. How should I go about upgrading to the latest version of bookstack? Is it as simple as deploying the new docker container with the new version and linking it with the mariadb for bookstack or... what?

Let's Encrypt

Hey, I'm trying to configure my docker-compose.yml to work with Let's Encrypt.

      jrcs/letsencrypt-nginx-proxy-companion
      jwilder/nginx-proxy 

are the images I'm using to handle the process automatically.
typically with this command added to the docker-compose.yml file added in the environment section

- VIRTUAL_HOST=wiki.foo.bar
- LETSENCRYPT_HOST=wiki.foo.bar
- [email protected]

docker-compose.yml

version: '2'
services:

  mysql:
    image: mysql:5.7.12
    environment:
    - MYSQL_ROOT_PASSWORD=secret
    - MYSQL_DATABASE=bookstack
    - MYSQL_USER=bookstack
    - MYSQL_PASSWORD=secret
    volumes:
    - ./mysql:/var/lib/mysql

  bookstack:
    image: solidnerd/bookstack:0.14.3
    depends_on:
    - mysql
    environment:
    - VIRTUAL_HOST=wiki.foo.bar
    - LETSENCRYPT_HOST=wiki.foo.bar
    - [email protected]
    - DB_HOST=mysql:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=bookstack
    - DB_PASSWORD=secret
    volumes:
    - ./uploads:/var/www/BookStack/public/uploads
    - ./storage-uploads:/var/www/BookStack/storage/uploads
    ports:
    - "8080:80"

This isn't working. I've tried to do this with individual containers as well with no luck.
Thanks for any help.

Docker using .env?

I am converting to the docker image hosting on AWS. I put the .env file in the same directory with docker-compose.yml etc. it contains LDAP settings but I do not see any packets going to my LDAP server. It appears that it may not be reading .env, do I have this in the wrong location?

thanks!

Bad gateway or 404 not found when changing db password

When I change the mysql password from secret to something else the container starts but I get a bad gateway error or a 404 not found.

  mysql:
    image: mysql:5.7.21
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=bookstack
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=secret
    volumes:
      - mysql-data:/var/lib/mysql
    networks:
      - internal

  bookstack:
    image: solidnerd/bookstack:latest
    depends_on:
      - mysql
    networks:
      - internal
      - web
    environment:
      - DB_HOST=mysql:3306
      - DB_DATABASE=bookstack
      - DB_USERNAME=bookstack
      - DB_PASSWORD=secret
    volumes:
      - uploads:/var/www/bookstack/public/uploads
      - storage-uploads:/var/www/bookstack/public/storage
    ports:
      - "8080:80"

Am I supposed to leave those values as secret?

How to upgrade

Hi There,

We are currently running version v0.14.3 and are trying to upgrade to the latest.

What is the best way at going about this?

I have tried replacing the docker-compose file with the new version but it didn't import the data.

This is my current config file:
`version: '2'
services:

mysql:
image: mysql:5.7.12
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=
volumes:
- ./mysql:/var/lib/mysql

bookstack:
image: solidnerd/bookstack:0.14.3
depends_on:
- mysql
environment:
- DB_HOST=mysql:3306
- DB_DATABASE=bookstack
- DB_USERNAME=bookstack
- DB_PASSWORD=
volumes:
- ./uploads:/var/www/BookStack/public/uploads
- ./storage-uploads:/var/www/BookStack/storage/uploads
ports:
- "80:80"

`

Any help would be greatly appreciated

Bookstack with NFS volumes

Has anyone tried running Bookstack in docker swarm using NFS volumes. I can successfully create a stack and run Bookstack but have not been able to get it use the NFS shares I defined as volumes in the docker compose. I do this with other containers all the time and it works.

0.25.0 Tag missing

Currently only the latest tag seems to have the latest version. We're missing a 0.25.0 tag.

Clarification About Purpose?

timeout 15 bash <<EOT
while ! (echo > /dev/tcp/${DB_HOST_NAME}/${DB_PORT}) >/dev/null 2>&1;
do sleep 1;
done;
EOT

It seems to me that the while loop's condition on line 92 will never evaluate true, though I could be wrong. Could you please clarify what this does/why it is there?

Thanks.

High CPU utilization

Hello,

I've been using your BookStack docker image recently, but I noticed a little annoying problem that I can not solve.

I have 10 Docker containers that run (with the included one) but when I look at using my CPU with https://quay.io/repository/vektorlab/ctop?tab=info, my Bookstack container and the only one that has the CPU percentage really random.
Every 2 seconds, I have CPU percentage changes but very high up to sometimes 107%

People would have the same concern as me?

ExitCode 124

Any idea why this container exit with code 124 when I access the website ?

  1. Connected mysql to bookstack_nw: docker network connect bookstack_nw mysql
  2. Created the bookstack container:
docker run -d -p 8282:80 \
--name bookstack  \
--net bookstack_nw \
-e DB_HOST=mysql:3306 \
-e DB_DATABASE=bookstack \
-e DB_USERNAME=bookstack \
-e DB_PASSWORD=XXXXXXX \
solidnerd/bookstack:latest
  1. Container running both in the same network.
    Launching the website on 10.10.10.10:8282 and it throws connection refused

  2. doing a docker ps -a I see the container down with status: Exited (124) 6 minutes ago

  3. Inspecting the container there was no OOM:

            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 124,
            "Error": "",
            "StartedAt": "2017-03-31T18:18:08.945555574Z",
            "FinishedAt": "2017-03-31T18:18:23.997517198Z"
  1. Starting the container again I see: Up 2 seconds 0.0.0.0:8282->80/tcp
    And it crash again as soon as I call the webpage

Too many docker volumes?

Running docker-compose up starts a total of 5 docker volumes, where two are unnamed. It seems they are used for uploads and storage-uploads, whilst dockerbookstack_storage-uploads and dockerbookstack_uploads remain empty when uploading images in Bookstack.

git clone https://github.com/solidnerd/docker-bookstack.git
cd docker-bookstack/
docker-compose up -d
docker volume ls

returns

DRIVER              VOLUME NAME
local               a6b65c0d08570639759ee0b4ed4dec7356dd41391de7f234e436b9f25e808f52
local               de5deb5b13d07c70f23a52a20737f806950b10c4c33ada5e533e053a4c26da33
local               dockerbookstack_mysql-data
local               dockerbookstack_storage-uploads
local               dockerbookstack_uploads

Containers migration

Currently i ran in troubles when decided to move container from one docker node (host) to another.
So here what i did :

  1. On dev machine
    docker export 6908ee7ac865 -o dockerbookstack_bookstack_1.tar
    docker export 3e7a56e1ff7b -o dockerbookstack_mysql_1.tar
  2. Moved tars to prod. machine
  3. Imported as following
root@dev# docker import dockerbookstack_bookstack_1.tar dockerbookstack_bookstack_1                                         
sha256:a7d86ca79638d91790ed70b065df5b9658f626837af45528d0340763c96fbc0c
root@dev:/opt/docker-bookstack# docker import /dockerbookstack_mysql_1.tar dockerbookstack_mysql_1                                                 
sha256:bcee80026b7072a5d99db3bb4473483450616b6acf7010ea986b8f129de4b611
  1. Then got the following error
Creating network "dockerbookstack_default" with the default driver
Creating dockerbookstack_mysql_1
Creating dockerbookstack_bookstack_1

ERROR: for bookstack  Cannot create container for service bookstack: No command specified
ERROR: Encountered errors while bringing up the project.

Any suggestion or advice on how migrate containers ?

container appears to be waiting for some kind of user input

I'm trying to get bookstack setup in docker using an external mariaDB instance on another server. However when the container starts the logs seem to indicate that it's waiting for some kind of input and the application never comes up. I've got the following environment variables setup.

DB_HOST
DB_DATABASE
DB_USERNAME
DB_PASSWORD

I'm sure I'm missing something...

5/12/2017 11:07:59 AM Do you really wish to run this command? (yes/no) [no]:
5/12/2017 11:17:04 AM > 2017-05-12T16:17:43.511073944Z wait-for-db: waiting for db.domain.net:3306
5/12/2017 11:17:44 AMwait-for-db: done
5/12/2017 11:17:44 AMDo not run Composer as root/super user! See https://getcomposer.org/root for details
5/12/2017 11:17:44 AM> php -r "!file_exists('bootstrap/cache/services.php') || @Unlink('bootstrap/cache/services.php');"
5/12/2017 11:17:44 AM> php -r "!file_exists('bootstrap/cache/compiled.php') || @Unlink('bootstrap/cache/compiled.php');"
5/12/2017 11:17:44 AMLoading composer repositories with package information
5/12/2017 11:17:44 AMInstalling dependencies (including require-dev) from lock file
5/12/2017 11:17:44 AMNothing to install or update
5/12/2017 11:17:44 AMGenerating autoload files
5/12/2017 11:17:44 AM> Illuminate\Foundation\ComposerScripts::postInstall
5/12/2017 11:17:44 AM> php artisan optimize
5/12/2017 11:17:44 AMGenerating optimized class loader
5/12/2017 11:17:45 AMThe compiled services file has been removed.
5/12/2017 11:17:45 AM> php artisan cache:clear
5/12/2017 11:17:45 AMCache cleared successfully.
5/12/2017 11:17:45 AM> php artisan view:clear
5/12/2017 11:17:46 AMCompiled views cleared!
5/12/2017 11:17:46 AM**************************************
5/12/2017 11:17:46 AM* Application In Production! *
5/12/2017 11:17:46 AM**************************************
5/12/2017 11:17:46 AM
5/12/2017 11:17:46 AM Do you really wish to run this command? (yes/no) [no]:

Container starts with prompt 'Do you really wish to run this command?'

Hey,

everytime I start the v0.17.0 container it will stop with a promt. I have to call exec apache2-foreground > /dev/null 2>&1 & inside the container to get it running.

> php artisan view:clear
stdout
11:00:17
Compiled views cleared!
stdout
11:00:17
�[33m**************************************�[39m
stdout
11:00:17
�[33m*     Application In Production!     *�[39m
stdout
11:00:17
�[33m**************************************�[39m
stdout
11:00:17

stdout
11:00:17
 �[32mDo you really wish to run this command? (yes/no)�[39m [�[33mno�[39m]:

Can't connect with non-default mysql port

If I change the mysql port I get wait-for-db in the logs, then an exit with code 124. I've tried this on two different systems with the same results. changing the port to default 3306 results in everything working.

docker-compose.yml file with non-default port (doesn't connect to mysql)
version: '2'
services:
mysql:
image: mysql:5.7.21
ports:
- 3406:3306
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=secret
volumes:
- /mnt/data1/storage/docker/bookstack/mysql-data:/var/lib/mysql

bookstack:
image: solidnerd/bookstack:0.22.0
depends_on:
- mysql
environment:
- DB_HOST=mysql:3406
- DB_DATABASE=bookstack
- DB_USERNAME=bookstack
- DB_PASSWORD=secret
volumes:
- /mnt/data1/storage/docker/bookstack/uploads:/var/www/bookstack/public/uploads
- /mnt/data1/storage/docker/bookstack/storage:/var/www/bookstack/public/storage
ports:
- "8080:80"

simply changing the 3406 to 3306 in both section allows bookstack to connect to mysql. I can't leave it that way since I have another mysql instance normally running on port 3306.

Any help is greatly appreciated.

Bob

How to use LDAP authentication?

When I log in using "[email protected]" and the password "admin", I am prompted: "An unknown error occurred". How can I solve it?

This is my docker-compose.yml file.

version: '2'
services:
  mysql:
    image: mysql:5.7.21
    environment:
    - MYSQL_ROOT_PASSWORD=secret
    - MYSQL_DATABASE=bookstack
    - MYSQL_USER=bookstack
    - MYSQL_PASSWORD=secret
    volumes:
    - /data/bookstack/mysql-data:/var/lib/mysql

  bookstack:
    image: solidnerd/bookstack:0.22.0
    depends_on:
    - mysql
    environment:
    - DB_HOST=mysql:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=bookstack
    - DB_PASSWORD=secret
    - AUTH_METHOD=ldap
    - LDAP_SERVER=192.168.10.10:389
    - LDAP_BASE_DN=ou=domain.com,dc=domain,dc=com
    - LDAP_USER_FILTER=(&(uid=$${user}))
    - LDAP_DN=cn=admin,dc=domain,dc=com
    - LDAP_PASS=admin
    volumes:
    - /data/bookstack/uploads:/var/www/bookstack/public/uploads
    - /data/bookstack/storage-uploads:/var/www/bookstack/public/storage
    ports:
    - "8080:80"

Bookstack container starts, then stops

used the docker compose method, and container starts, then stops. the logs for the container are below.

`wait-for-db: waiting for mysql:3306,
wait-for-db: waiting for mysql:3306,
wait-for-db: done,
Do not run Composer as root/super user! See https://getcomposer.org/root for details,

php -r "!file_exists('bootstrap/cache/services.php') || @Unlink('bootstrap/cache/services.php');",
php -r "!file_exists('bootstrap/cache/compiled.php') || @Unlink('bootstrap/cache/compiled.php');",
Loading composer repositories with package information,
Installing dependencies (including require-dev) from lock file,
Nothing to install or update,
Generating optimized autoload files,
Illuminate\Foundation\ComposerScripts::postAutoloadDump,
@php artisan package:discover,
Discovered Package: barryvdh/laravel-debugbar,
Discovered Package: barryvdh/laravel-dompdf,
Discovered Package: barryvdh/laravel-ide-helper,
Discovered Package: barryvdh/laravel-snappy,
Discovered Package: fideloper/proxy,
Discovered Package: intervention/image,
Discovered Package: laravel/socialite,
Discovered Package: socialiteproviders/manager,
Package manifest generated successfully.,
php artisan cache:clear,
Cache cleared successfully.,
php artisan view:clear,
Compiled views cleared!,
**************************************,

  • Application In Production!     *,
    

**************************************,
,
Command Cancelled!,
Migration table created successfully.,
wait-for-db: waiting for mysql:3306,
wait-for-db: done,
Do not run Composer as root/super user! See https://getcomposer.org/root for details,

php -r "!file_exists('bootstrap/cache/services.php') || @Unlink('bootstrap/cache/services.php');",
php -r "!file_exists('bootstrap/cache/compiled.php') || @Unlink('bootstrap/cache/compiled.php');",
Loading composer repositories with package information,
Installing dependencies (including require-dev) from lock file,
Nothing to install or update,
Generating optimized autoload files,
Illuminate\Foundation\ComposerScripts::postAutoloadDump,
@php artisan package:discover,
Discovered Package: barryvdh/laravel-debugbar,
Discovered Package: barryvdh/laravel-dompdf,
Discovered Package: barryvdh/laravel-ide-helper,
Discovered Package: barryvdh/laravel-snappy,
Discovered Package: fideloper/proxy,
Discovered Package: intervention/image,
Discovered Package: laravel/socialite,
Discovered Package: socialiteproviders/manager,
Package manifest generated successfully.,
php artisan cache:clear,
Cache cleared successfully.,
php artisan view:clear,
Compiled views cleared!,
**************************************,

  • Application In Production!     *,
    

**************************************,
,
Command Cancelled!,
[2018-07-23 00:57:38] production.ERROR: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' already exists (SQL: create table cache (key varchar(191) not null, value text not null, expiration int not null) default character set utf8mb4 collate utf8mb4_unicode_ci) {"exception":"[object] (Illuminate\Database\QueryException(code: 42S01): SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' already exists (SQL: create table cache (key varchar(191) not null, value text not null, expiration int not null) default character set utf8mb4 collate utf8mb4_unicode_ci) at /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, PDOException(code: 42S01): SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' already exists at /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458)"} [],
,
,
[Illuminate\Database\QueryException] ,
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre ,
ady exists (SQL: create table cache (key varchar(191) not null, value ,
text not null, expiration int not null) default character set utf8mb4 co ,
llate utf8mb4_unicode_ci) ,
,
,
,
[PDOException] ,
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre ,
ady exists ,
,
,`

Code editor offscreen

I upgraded from 0.16.2 to 0.17.0 by updating the tag of the image in the docker-compose file.

When I edit pages that I had previously created with code blocks, they are split into a code block for each line and display off of the page.

Any assistance would be appreciated.

Change Language

How can i change the language of Bookstack? the documentation says changing the .env, but i can't, i tried doing this and doesn't work at all

Mysql backup

Hi , I am bit worried about data loss , Which is best way to backup docker instance (including mysql dump, site configuration,images)

port to AWS (RDS Database)

Maybe it's obvious but I'm fairly new to docker. Attempt to change database to point to RDS and I get

bookstack_1  |   SQLSTATE[HY000] [1049] Unknown database 'bookstack' (SQL: select * from inf  
bookstack_1  |   ormation_schema.tables where table_schema = bookstack and table_name = migr  
bookstack_1  |   ations)                                                                                                                   
bookstack_1  |   [PDOException]                                       
bookstack_1  |   SQLSTATE[HY000] [1049] Unknown database 'bookstack'  
                                                    

The database would not be created in this case, is there something I should run to create it?

Here is my docker-compose.yml

  bookstack:
    image: solidnerd/bookstack:0.17.1
    environment:
    - DB_HOST=sdfsdfsdf.cccssdfsfsdfsdf.us-east-1.rds.amazonaws.com:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=someuser
    - DB_PASSWORD=secretpassword
    volumes:
    - uploads:/var/www/BookStack/public/uploads
    - storage-uploads:/var/www/BookStack/storage/uploads
    ports:
    - "8080:80"

No such file or directory error in version 0.15.3

Hello,

Running the 0.15.3 version gives me the following error:

core@core-01 ~ $ docker logs bookstack
/docker-entrypoint.sh: line 12: /var/www/BookStack/.env: No such file or directory

0.14.3 does not give this message

Email confirmation not able to send

Hey,
Just deployed this with docker-compose. Set it up restricted email addressed for registration. Get this error when trying to register. Is it missing a mailer-package?

Email error

How to update

Hello, I'm french guy.
Excuse me for my English.
How to update Bookstack via docker ?
Thank's

Reinstall docker container

I set up this docker container behind a nginx container. The nginx only redirect calls to the apache.
I want to test if I could replace the bookstack container with a new one, for later updates.
The database already exist and login prozess is started, but server runs to an Internel Server error.

LDAP group syncing

Hi,

The docs of bookstack are specifying three variables in the .env file for enabling LDAP group sync.

# Enable LDAP group sync, Set to 'true' to enable.
LDAP_USER_TO_GROUPS=true

# LDAP user attribute containing groups, Defaults to 'memberOf'.
LDAP_GROUP_ATTRIBUTE="memberOf"

# Remove users from roles that don't match LDAP groups.
LDAP_REMOVE_FROM_GROUPS=false

Is it possible to add these settings in the docker-entryoint.sh. For example:

LDAP_USER_TO_GROUPS=${LDAP_USER_TO_GROUPS:-false}
LDAP_GROUP_ATTRIBUTE=${LDAP_GROUP_ATTRIBUTE:-memberOf}
LDAP_REMOVE_FROM_GROUPS=${LDAP_REMOVE_FROM_GROUPS:-false}

Looking forward to a reply.

Specifying LDAP protocol in compose-file does not work

Hi,

on v0.25.0 I'm having an issue with setting up an LDAP connection. My docker-compose.yml includes the following lines:

    environment:
      - LDAP_SERVER=ldap://ldap.example.com:389
      - LDAP_BASE_DN=ou=people,dc=ldap,dc=example,dc=com
      - LDAP_DN="cn=Directory Manager"
      - LDAP_PASS=password
      - LDAP_USER_FILTER=(&(uid=$${user}))
      - LDAP_EMAIL_ATTRIBUTE=mail

When trying to login, this results in an error:
"ldap_bind(): Unable to bind to server: Can't contact LDAP server"

However, if I remove the protocol from the LDAP_SERVER line, i.e.
- LDAP_SERVER=ldap.example.com:389
then it suddenly starts to work.

Now this is not preventing me from contacting my LDAP server with the standard protocol, as I can just leave it out. But it might be a reason for the fact that I can't get a secure connection via ldaps:// to work.

Enhancement

The docker image is a great job and it works as it should.

Could you add a volume to the container for data persistence?

And can you tell when v0.15.2 would be available? I like to use the German translation which is into the newer version

Container behind load balancer sending back http prefix rather than https

Using OKTA login, sitting behind a load balancer that is listening on 443 and forwarding to 8080 for the container. When the user logs in with OKTA at https://dev-wiki.fsu.com/login, they are redirected to http://dev-wiki.fsu.com/ which is not a valid site. However, it did indeed log them in with OKTA and a refresh of https://dev-wiki.fsu.com/ leaves everything working as expected.

Another data point: I pointed the load balancer at the same version of bookstack, only installed on a local machine rather than the container and it works fine. This config uses identical OKTA settings as well as an identical .env file. One difference is that the local version is running on 443.

Perhaps apache2 in the container needs some kind of rewrite rules. I did attach to the container directly and modify /etc/apache2/sites-enabled# cat bookstack.conf

and added

 RewriteEngine on 
 RewriteCond %{HTTP:X-Forwarded-Proto} !https 
 RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

But it did not seem to help.

Any ideas are most appreciated,
Thanks

Using ssl

Is there a documented place for setting up an SSL certificate for docker bookstack?

Docker with v0.24

Hey,
is it possible to update the docker container to v0.24 myself or do i have to wait for a new docker image?

Thank you for Bookstack. Love it :)

how to set up email?

when I enable register feature and use email to validate.
But when I register a new a account, it's failed. Because bookstack can send out email.

lose image

I hit two issues when use image,

  1. some images disapper with no reason. I don't remove them manually.
  2. when I upload new image, it's no the one I upload, but the one already in image list.

Could you help to give some advice.

docker volum

I want to ask, why you only share public volume? I want to set a volume to my host system and change the .env, but if I set it with volume option of docker, it empty the bookstack directory. Will it be possible to mount the complete docker folder to host system?

thank you for the docker container, its a nice work.

LDAP bind failing

Using the latest Docker with .env and LDAP set to:

# LDAP Settings
LDAP_SERVER=10.80.99.120:389
LDAP_BASE_DN=OU=Employees,DC=lab,DC=xxxx,DC=com
LDAP_DN='CN=read-only,OU=Service Accounts,DC=lab,DC=xxxxx,DC=com'
LDAP_PASS=supsersecretpassword
#LDAP_DN=false
#LDAP_PASS=false
LDAP_USER_FILTER=(&(samaccountname=${user}))
LDAP_VERSION=2
LDAP_EMAIL_ATTRIBUTE=url

I can see the application contact the LDAP server (AD) & packets show up on wireshark. (bindrequest, bindresponse)

From the app log is see:

in Ldap.php line 94
at HandleExceptions->handleError(2, 'ldap_bind(): Unable to bind to server: Invalid credentials', '/var/www/bookstack/app/Services/Ldap.php', 94, array('ldapConnection' => resource, 'bindRdn' => '\'CN=read-only,OU=Service Accounts,DC=lab,DC=xxxx,DC=com\'', 'bindPassword' => 'supsersecretpassword'))

Note this combination of Base_DN, LDAP_DN, PASS are working on an older, non-docker version of bookstack at this time as well as other applications in my environment. I also tried to connect with a local LDAPMANAGER application using these credentials and it also works fine.

Thanks!

Bookstack doesn't start

Bookstack doesn't start. All I got in the logs is:

.....
> php artisan view:clear
Compiled views cleared!

**************************************
*     Application In Production!     *
**************************************
 Do you really wish to run this command? (yes/no) [no]:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.