Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Help setting up bookstack on Portainer #5431

Open
2 tasks done
gttech2025 opened this issue Jan 20, 2025 · 1 comment
Open
2 tasks done

Need Help setting up bookstack on Portainer #5431

gttech2025 opened this issue Jan 20, 2025 · 1 comment

Comments

@gttech2025
Copy link

gttech2025 commented Jan 20, 2025

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

so i ran the set up correctly still need further help my bookstack

this is the docker - Compose.yml i used to set up on portainer

Details

version: "2"

services:
  # Service definition for BookStack
  bookstack:
    image: lscr.io/linuxserver/bookstack # The Docker image for BookStack
    container_name: bookstack # Name of the container
    environment: # Environment variables for the BookStack service
      - PUID=1000 # User ID for the process
      - PGID=1000 # Group ID for the process
      - APP_URL=http://172.25.189.2:6875 # URL for accessing BookStack
      - DB_HOST=bookstack_db # Hostname of the database service
      - DB_PORT=3306 # Port for the database service
      - DB_USER=bookstack # Database user
      - DB_PASS=secret # Database password
      - DB_DATABASE=bookstackapp # Database name
      - APP_DEFAULT_DARK_MODE=true # Enable dark mode by default
    volumes:
      - bookstack_config:/config # Mount the volume for BookStack configuration
    ports:
      - 6875:80 # Map port 6875 on the host to port 80 in the container
    restart: unless-stopped # Restart policy
    depends_on:
      - bookstack_db # This service depends on the bookstack_db service
    networks:
      - bookstack-network # Connect to the bookstack-network

  # Service definition for the database (MariaDB)
  bookstack_db:
    image: lscr.io/linuxserver/mariadb # The Docker image for MariaDB
    container_name: bookstack_db # Name of the container
    environment: # Environment variables for the MariaDB service
      - MYSQL_ROOT_PASSWORD=your_root_password # Root password for MariaDB
      - MYSQL_DATABASE=bookstackapp # Database name
      - MYSQL_USER=bookstack # Database user
      - MYSQL_PASSWORD=secret # Database password
    volumes:
      - bookstack_db_data:/var/lib/mysql # Mount the volume for MariaDB data
    restart: unless-stopped # Restart policy
    networks:
      - bookstack-network # Connect to the bookstack-network

volumes:
  bookstack_config: # Volume for storing BookStack configuration
    driver: local
  bookstack_db_data: # Volume for storing MariaDB data
    driver: local

# Define the network configuration
networks:
  bookstack-network: # Custom network for inter-container communication
    driver: bridge # Use the bridge driver for the network

Exact BookStack Version

2

Log Content

logs say im missing this info " using keys found in /config/keys The application key is missing, halting init! You can generate a key with: docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
And apply it to the APP_KEY environment variable. "
Any help will be great .

Hosting Environment

Ubuntu and Portainer

@ssddanbrown
Copy link
Member

Please see the readme for the linuxserver image for details on what env options are needed for the current image version:

https://github.com/linuxserver/docker-bookstack?tab=readme-ov-file#parameters

Specifically:

  • DB_USER should now be DB_USERNAME.
  • DB_PASS should now be DB_PASSWORD.
  • You need to set an APP_KEY, which is generated as per the logged output and linuxserver readme. I'm not familiar enough with portainer to know how to run the one-off command via portainer though.

Also, the volume mapping for that mariadb container looks wrong, See: https://docs.linuxserver.io/images/docker-mariadb/#volume-mappings-v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants