Add docker-compose.yml
This commit is contained in:
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
booklore:
|
||||
# Official Docker Hub image:
|
||||
image: booklore/booklore:latest
|
||||
# Or the GHCR image:
|
||||
# image: ghcr.io/booklore-app/booklore:latest
|
||||
container_name: booklore
|
||||
environment:
|
||||
- USER_ID=0
|
||||
- GROUP_ID=0
|
||||
- TZ=America/Chicago
|
||||
- DATABASE_URL=jdbc:mariadb://mariadb:3306/booklore
|
||||
- DATABASE_USERNAME=booklore # Must match MYSQL_USER defined in the mariadb container
|
||||
- DATABASE_PASSWORD=Alright-Femur7-Favoring
|
||||
- BOOKLORE_PORT=6060 # Port BookLore listens on inside the container; must match container port below
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "6060:6060" # HostPort:ContainerPort → Keep both numbers the same, and also ensure the container port matches BOOKLORE_PORT, no exceptions.
|
||||
# All three (host port, container port, BOOKLORE_PORT) must be identical for BookLore to function properly.
|
||||
# Example: To expose on host port 7070, set BOOKLORE_PORT=7070 and use "7070:7070".
|
||||
volumes:
|
||||
- /srv/docker/booklore/data:/app/data # Application data (settings, metadata, cache, etc.). Persist this folder to retain your library state across container restarts.
|
||||
- /srv/books:/books # Primary book library folder. Mount your collection here so BookLore can access and organize your books.
|
||||
- /downloads/complete/books:/bookdrop # BookDrop folder. Files placed here are automatically detected and prepared for import.
|
||||
restart: unless-stopped
|
||||
|
||||
mariadb:
|
||||
image: lscr.io/linuxserver/mariadb:11.4.5
|
||||
container_name: mariadb
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Chicago
|
||||
- MYSQL_ROOT_PASSWORD=super_secure_password # Use a strong password for the database's root user, should be different from MYSQL_PASSWORD
|
||||
- MYSQL_DATABASE=booklore
|
||||
- MYSQL_USER=booklore # Must match DATABASE_USERNAME defined in the booklore container
|
||||
- MYSQL_PASSWORD=Alright-Femur7-Favoring # Use a strong password; must match DATABASE_PASSWORD defined in the booklore container
|
||||
volumes:
|
||||
- /srv/docker/booklore/mariadb/config:/config
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: [ "CMD", "mariadb-admin", "ping", "-h", "localhost" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
Reference in New Issue
Block a user