linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
747 stars 108 forks source link

[BUG] Can't bind ANY port #165

Closed Justuser3310 closed 1 year ago

Justuser3310 commented 1 year ago

Is there an existing issue for this?

Current Behavior

I start docker container with docker-compose up on default config. Then open browser on 192.168.31.130:80/l192.168.31.130:6875 and... Don't see any reaction from bookstack.

I also tried with bore (local port to bore.pub:4356 or other port).

Expected Behavior

I will see anything in browser or in console.

Steps To Reproduce

  1. Setup default config
  2. Change passwords on db and etc.
  3. Start with docker-compose up
  4. Open firefox/chrome on 192.168.31.130:80/192.168.31.130:6875

Environment

- OS: Manjaro ARM
- How docker service was installed:
sudo pacman -S docker-compose
sudo pacman -S docker
sudo usermod -aG docker orange
sudo systemctl enable docker
sudo gpasswd -a orange docker

CPU architecture

arm64

Docker creation

docker-compose up

Container logs

[+] Running 2/2
 ⠿ Container bookstack_db  Created                                                                               0.0s
 ⠿ Container bookstack     Recreated                                                                             0.5s
Attaching to bookstack, bookstack_db
bookstack_db  | [migrations] started
bookstack_db  | [migrations] no migrations found
bookstack_db  | usermod: no changes
bookstack_db  | ───────────────────────────────────────
bookstack_db  | 
bookstack_db  |       ██╗     ███████╗██╗ ██████╗ 
bookstack_db  |       ██║     ██╔════╝██║██╔═══██╗
bookstack_db  |       ██║     ███████╗██║██║   ██║
bookstack_db  |       ██║     ╚════██║██║██║   ██║      
bookstack_db  |       ███████╗███████║██║╚██████╔╝
bookstack_db  |       ╚══════╝╚══════╝╚═╝ ╚═════╝ 
bookstack_db  | 
bookstack_db  |    Brought to you by linuxserver.io
bookstack_db  | ───────────────────────────────────────
bookstack_db  | 
bookstack_db  | To support LSIO projects visit:
bookstack_db  | https://www.linuxserver.io/donate/
bookstack_db  | 
bookstack_db  | ───────────────────────────────────────
bookstack_db  | GID/UID
bookstack_db  | ───────────────────────────────────────
bookstack_db  | 
bookstack_db  | User UID:    1000
bookstack_db  | User GID:    1000
bookstack_db  | ───────────────────────────────────────
bookstack_db  | 
bookstack_db  | [custom-init] No custom files found, skipping...
bookstack_db  | 230311 18:10:16 mysqld_safe Logging to '/config/databases/b78b6ef3093f.err'.
bookstack_db  | 230311 18:10:16 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack     | [migrations] started
bookstack     | [migrations] 01-nginx-site-confs-default: skipped
bookstack     | [migrations] 02-default-location: skipped
bookstack     | [migrations] done
bookstack     | ───────────────────────────────────────
bookstack     | 
bookstack     |       ██╗     ███████╗██╗ ██████╗ 
bookstack     |       ██║     ██╔════╝██║██╔═══██╗
bookstack     |       ██║     ███████╗██║██║   ██║
bookstack     |       ██║     ╚════██║██║██║   ██║      
bookstack     |       ███████╗███████║██║╚██████╔╝
bookstack     |       ╚══════╝╚══════╝╚═╝ ╚═════╝ 
bookstack     | 
bookstack     |    Brought to you by linuxserver.io
bookstack     | ───────────────────────────────────────
bookstack     | 
bookstack     | To support LSIO projects visit:
bookstack     | https://www.linuxserver.io/donate/
bookstack     | 
bookstack     | ───────────────────────────────────────
bookstack     | GID/UID
bookstack     | ───────────────────────────────────────
bookstack     | 
bookstack     | User UID:    1000
bookstack     | User GID:    1000
bookstack     | ───────────────────────────────────────
bookstack     | 
bookstack     | using keys found in /config/keys
bookstack     | App Key found - setting variable for seds
bookstack     | Running config - DB_HOST set
bookstack     | **** APP_URL in /config/www/.env is being updated from http://192.168.31.130 to http://192.168.31.130:6875 ****
bookstack     | **** If this is an existing install, you should run the following line from your host terminal to update the database URL entries: ****
bookstack     | ************************************************************************
bookstack     | docker exec -it bookstack php /app/www/artisan bookstack:update-url http://192.168.31.130 http://192.168.31.130:6875
bookstack     | ************************************************************************
bookstack     | Waiting for DB to be available
bookstack_db  | [ls.io-init] done.
bookstack     | 
bookstack     |    INFO  Nothing to migrate.  
bookstack     | 
bookstack     | [custom-init] No custom files found, skipping...
bookstack     | [ls.io-init] done.
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

github-actions[bot] commented 1 year ago

A human has marked this issue as invalid, this likely happened because the issue template was not used in the creation of the issue.

homerr commented 1 year ago

Can you post your docker-compose.yml please to give us a clue as to how you've configured networking.

Justuser3310 commented 1 year ago

docker-compose.yml

---
version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=http://192.168.31.130:6875
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=REDACTED
      - DB_DATABASE=bookstackapp
    volumes:
      - ./config:/config
    ports:
      - 6875:6875
    restart: unless-stopped
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=REDACTED
      - TZ=Europe/London
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=REDACTED
    volumes:
      - ./config_db:/config
    restart: unless-stopped

Also I tried change APP_URL, change port to other. This is not problem with firewall in system or with port, other apps work good.

Roxedus commented 1 year ago

You want - 6875:80, as already noted in the readme. https://github.com/linuxserver/docker-bookstack#docker-compose-recommended-click-here-for-more-info

Justuser3310 commented 1 year ago

You want - 6875:80, as already noted in the readme. https://github.com/linuxserver/docker-bookstack#docker-compose-recommended-click-here-for-more-info

Thanks, it works.

I think this didn't work, because i bind 6875 to other 6875 which is not using. Also APP_URL should be bind to the same port.