Problem with quick start
vinkin56 opened this issue · 5 comments
Hello!
My instance in cloud:
Debian11
External ip (no localhost connection)
URL http://justbookstack.ddns.net/
Docker version 20.10.5
My step:
git clone git@github.com:solidnerd/docker-bookstack.git
Edit docker-compose.yml :
version: '2'
services:
mysql:
image: mysql:8.1
environment:
- MYSQL_ROOT_PASSWORD=My..Uz2..secret
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=My..Uz2..secret
volumes:
- mysql-data:/var/lib/mysql
bookstack:
image: solidnerd/bookstack:23.8.3
depends_on:
- mysql
environment:
- DB_HOST=mysql:3306
- DB_DATABASE=bookstack
- DB_USERNAME=bookstack
- DB_PASSWORD=My..Uz2..secret
#set the APP_ to the URL of bookstack without without a trailing slash APP_URL=https://example.com
- APP_URL=http://justbookstack.ddns.net
# APP_KEY is used for encryption where needed, so needs to be persisted to
# preserve decryption abilities.
# Can run php artisan key:generate to generate a key
- APP_KEY=My*******************s1ZJrNiO6o*****************************************key
volumes:
- uploads:/var/www/bookstack/public/uploads
- storage-uploads:/var/www/bookstack/storage/uploads
ports:
- "80:8080"
volumes:
mysql-data:
uploads:
storage-uploads:
Start: docker-compose up
Community Server - GPL. bookstack_1 | Starting Migration... bookstack_1 | wait-for-db: done bookstack_1 | bookstack_1 | INFO Nothing to migrate. bookstack_1 | bookstack_1 | Clearing caches... bookstack_1 | bookstack_1 | INFO Application cache cleared successfully. bookstack_1 | bookstack_1 | bookstack_1 | INFO Compiled views cleared successfully. bookstack_1 | bookstack_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.3. Set the 'ServerName' directive globally to suppress this message bookstack_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.3. Set the 'ServerName' directive globally to suppress this message bookstack_1 | [Wed Sep 20 14:51:11.757092 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.10 configured -- resuming normal operations bookstack_1 | [Wed Sep 20 14:51:11.757188 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' bookstack_1 | bookstack:80 235.105.124.196 - - [20/Sep/2023:14:51:32 +0000] "GET / HTTP/1.1" 500 15553 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
I see an error in the log: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.3. Set the 'ServerName' directive globally to suppress this message
I get an error in the browser:

I understand that there is an error in the apache2 configuration, how can I solve it?
Make sure your APP_KEY is a random string of 32 characters, as this looks like #421.
The Apache2 error can be ignored in this case.
- APP_KEY=ROpBUapgJ/liwX8sv+mrpJxid+KDs1ZJrNiO6o8ZRWOA3VfZYLJY6yhKlZfTQujQ
generated by: https://generate-random.org/encryption-key-generator?count=1&bytes=32&cipher=aes-256-cbc&string=&password=
I'm not connecting to localhost, I'm connecting to an external ip.
This website generates a random string of 32 bytes, not 32 characters. As my understanding goes, it has to be exactly 32 characters.
And don't forget to delete the container and it's data after the change and before restarting.
Edit: on Linux and probably mac you can use
head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo ''
You are the best, everything worked out!