BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.3k stars 1.91k forks source link

Cant figure this out #5298

Open PJTharpeNoob opened 1 week ago

PJTharpeNoob commented 1 week ago

Attempted Debugging

Searched GitHub Issues

Describe the Scenario

I have been working on this the past week, and my limited experience is the problem I know, but I'm stumped.

I purchased a VPS, installed ubuntu 22.04, docker, aaPanel with LEMP stack. I've been attempting to install bookstack through docker with a reverse proxy for nginx. Couldn't figure it out so I wiped my VPS and started over with just Ubuntu and Docker.

This is the exact docker-compose.yml file below.

Basically my biggest confusion is if the APP_KEY is required or not? I generated this app key by using the command docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey

I have attempted this at least 10 times and sometimes I can get the page to load but everything is formatted weird and I get a failure when I click log in.

Any help would be appreciated. Thank you! - PJ


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

  bookstack:
    image: solidnerd/bookstack:24.10.0
    depends_on:
    - mysql
    environment:
    - DB_HOST=mysql:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=bookstack
    - DB_PASSWORD=bookstackpw
    #set the APP_ to the URL of bookstack without without a trailing slash APP_URL=https://example.com
    - APP_URL=http://147.79.78.208
    # 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=3733e2b9a99f15b7d343e7b59d7baeffddbb564890b7f2179b65044c1c8f0769
    volumes:
    - uploads:/var/www/bookstack/public/uploads
    - storage-uploads:/var/www/bookstack/storage/uploads
    ports:
    - "8080:8080"

volumes:
 mysql-data:
 uploads:
 storage-uploads:

--------

### Exact BookStack Version

24.10

### Log Content

_No response_

### Hosting Environment

Ubuntu 22.04, PHP 8.1
ssddanbrown commented 1 week ago

Basically my biggest confusion is if the APP_KEY is required or not?

Yeah, it's required and should be set. The value doesn't look what you'd get from the mentioned command so not sure where that value has come from. From the command the value should start with base64:.

I can get the page to load but everything is formatted weird and I get a failure when I click log in.

Typically, that occurs when the APP_URL is not set, or it does not full align with the URL you're using to access BookStack via in the browser.