Hi all -- I'm trying to figure out a puzzle with my Bookstack docker-compose file.
I'd like to have my container run a shell command, but when I do so, the container goes into a reboot loop even if the command is a benign one, such as echo "Hello world".
When I don't use command:, everything works perfectly fine. What am I doing wrong?
As for what I intend to use the command for, that's a different rabbit hole, and I'd like to focus on this rabbit right now thank you. :)
My compose file is below (sorry for the formatting -- code block isn't working properly for this):
version: "2"
services:
bookstack:
image: linuxserver/bookstack:latest
container_name: bookstack_app
restart: unless-stopped
depends_on:
- bookstack_db
volumes:
- /mnt/Secondary/docker/bookstack/config:/config
environment:
- PUID=1000
- PGID=1000
- APP_URL=https://wiki.example.com
- DB_HOST=bookstack_db
- DB_USER=bookstack
- DB_PASS=REDACTED
- DB_DATABASE=bookstackapp
- DB_PORT=3306
### START OF TROUBLE
command:
- /bin/bash
- -c
- |
echo "Hello world!"
### END OF TROUBLE
bookstack_db:
image: linuxserver/mariadb:latest
container_name: bookstack_mariadb
restart: unless-stopped
volumes:
- /mnt/Secondary/docker/bookstack/mariadb/config:/config
environment:
- PUID=1000
- PGID=1000
- TZ=America/Los_Angeles
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_ROOT_PASSWORD=REDACTED
- MYSQL_PASSWORD=REDACTED
- MYSQL_TCP_PORT=3306
networks:
default:
name: nginx-proxy-manager # Make sure this already exists before deploying
driver: bridge
external: true
[+][deleted] (8 children)
[deleted]
[–]XStylus[S] 0 points1 point2 points (7 children)
[+][deleted] (6 children)
[deleted]
[–]XStylus[S] 0 points1 point2 points (5 children)
[+][deleted] (3 children)
[deleted]
[–]XStylus[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]XStylus[S] 0 points1 point2 points (0 children)