You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-61Lines changed: 46 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,54 +91,70 @@ Ensure you have [Docker](https://docs.docker.com/get-docker/) and [Docker Compos
91
91
92
92
> **Note:** Legacy images under `https://ghcr.io/adityachandelgit/booklore-app` will remain available but will not receive new updates.
93
93
94
-
### 2️⃣ Create docker-compose.yml
94
+
### 2️⃣ Set Up Your docker-compose.yml Configuration
95
95
96
-
> ⚠️ If you intend to run the container as a non-root user, you must manually create all of your `/your/local/path/to/booklore` directories with read and write permissions for your intended user **before first run**.
96
+
**Step 1: Create a `.env` file** in the same directory as your `docker-compose.yml`:
97
97
98
-
Create a `docker-compose.yml` file with content:
98
+
```ini
99
+
# BookLore Application Settings
100
+
APP_USER_ID=0
101
+
APP_GROUP_ID=0
102
+
TZ=Etc/UTC
103
+
BOOKLORE_PORT=6060
104
+
105
+
# Database Connection (BookLore)
106
+
DATABASE_URL=jdbc:mariadb://mariadb:3306/booklore
107
+
DB_USER=booklore
108
+
DB_PASSWORD=ChangeMe_BookLoreApp_2025!
109
+
110
+
# MariaDB Container Settings
111
+
DB_USER_ID=1000
112
+
DB_GROUP_ID=1000
113
+
MYSQL_ROOT_PASSWORD=ChangeMe_MariaDBRoot_2025!
114
+
MYSQL_DATABASE=booklore
115
+
```
116
+
117
+
**Step 2: Create a `docker-compose.yml` file** that references the `.env` variables:
- DATABASE_USERNAME=booklore # Must match MYSQL_USER defined in the mariadb container
114
-
- DATABASE_PASSWORD=your_secure_password
115
-
- BOOKLORE_PORT=6060 # Port BookLore listens on inside the container; must match container port below
127
+
- USER_ID=${APP_USER_ID}
128
+
- GROUP_ID=${APP_GROUP_ID}
129
+
- TZ=${TZ}
130
+
- DATABASE_URL=${DATABASE_URL}
131
+
- DATABASE_USERNAME=${DB_USER}
132
+
- DATABASE_PASSWORD=${DB_PASSWORD}
133
+
- BOOKLORE_PORT=${BOOKLORE_PORT}
116
134
depends_on:
117
135
mariadb:
118
136
condition: service_healthy
119
137
ports:
120
-
- "6060:6060"# HostPort:ContainerPort → Keep both numbers the same, and also ensure the container port matches BOOKLORE_PORT, no exceptions.
121
-
# All three (host port, container port, BOOKLORE_PORT) must be identical for BookLore to function properly.
122
-
# Example: To expose on host port 7070, set BOOKLORE_PORT=7070 and use "7070:7070".
138
+
- "${BOOKLORE_PORT}:${BOOKLORE_PORT}"
123
139
volumes:
124
-
- /your/local/path/to/booklore/data:/app/data# Application data (settings, metadata, cache, etc.). Persist this folder to retain your library state across container restarts.
125
-
- /your/local/path/to/booklore/books:/books# Primary book library folder. Mount your collection here so BookLore can access and organize your books.
126
-
- /your/local/path/to/booklore/bookdrop:/bookdrop# BookDrop folder. Files placed here are automatically detected and prepared for import.
140
+
- ./data:/app/data
141
+
- ./books:/books
142
+
- ./bookdrop:/bookdrop
127
143
restart: unless-stopped
128
144
129
145
mariadb:
130
146
image: lscr.io/linuxserver/mariadb:11.4.5
131
147
container_name: mariadb
132
148
environment:
133
-
- PUID=1000
134
-
- PGID=1000
135
-
- TZ=Etc/UTC
136
-
- MYSQL_ROOT_PASSWORD=super_secure_password # Use a strong password for the database's root user, should be different from MYSQL_PASSWORD
137
-
- MYSQL_DATABASE=booklore
138
-
- MYSQL_USER=booklore # Must match DATABASE_USERNAME defined in the booklore container
139
-
- MYSQL_PASSWORD=your_secure_password # Use a strong password; must match DATABASE_PASSWORD defined in the booklore container
| `USER_ID` | `0` | User ID for file ownership within the container. Set this to match your host user's UID if running as non-root (e.g., `1000`). Use `id -u` on Linux to find your UID. |
176
-
| `GROUP_ID` | `0` | Group ID for file ownership within the container. Set this to match your host user's GID if running as non-root (e.g., `1000`). Use `id -g` on Linux to find your GID. |
177
-
| `TZ` | `Etc/UTC` | Timezone for the application. Controls timestamps in logs and UI. Use standard timezone identifiers (e.g., `America/New_York`, `Europe/London`, `Asia/Tokyo`). See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). |
178
-
| `DATABASE_URL` | `jdbc:mariadb://mariadb:3306/booklore` | JDBC connection string for MariaDB/MySQL database. Format: `jdbc:mariadb://hostname:port/database_name`. Only modify if using a custom database host, port, or external database server. |
179
-
| `DATABASE_USERNAME` | `booklore` | Username for database authentication. Must match `MYSQL_USER` in your MariaDB container configuration. |
180
-
| `DATABASE_PASSWORD` | - | Password for database authentication. **Required**. Use a strong, unique password. Must match `MYSQL_PASSWORD` in your MariaDB container configuration. Store securely and never commit to version control. |
181
-
| `BOOKLORE_PORT` | `6060` | Internal port BookLore listens on. **Critical**: This must match both the host and container ports in your port mapping (e.g., `6060:6060`). Changing this requires updating all three values. Example: For port `7070`, use `BOOKLORE_PORT=7070` and `7070:7070`. |
182
-
| `SWAGGER_ENABLED` | `false` | Controls access to Swagger UI for API documentation and testing. Set to `true` to enable at `/swagger-ui.html` (useful for development/testing). Keep `false` in production for security. |
183
-
| `FORCE_DISABLE_OIDC` | `false` | Forces local username/password authentication only. Set to `true` to completely disable OIDC/OAuth2 providers (Authentik, Pocket ID, etc.). Useful for troubleshooting authentication issues or temporarily bypassing external identity providers. |
| `PUID` | `1000` | Process User ID for the LinuxServer.io MariaDB container. Set this to match your host user's UID for proper file permissions. Use `id -u` on Linux to find your UID. |
190
-
| `PGID` | `1000` | Process Group ID for the LinuxServer.io MariaDB container. Set this to match your host user's GID for proper file permissions. Use `id -g` on Linux to find your GID. |
191
-
| `TZ` | `Etc/UTC` | Timezone for the MariaDB container. Should match the BookLore container's timezone for consistency in timestamps. |
192
-
| `MYSQL_ROOT_PASSWORD` | - | Root password for the MariaDB database. **Required**. Use a strong, unique password different from `MYSQL_PASSWORD`. This provides administrative access to the database server. Never expose or commit to VCS. |
193
-
| `MYSQL_DATABASE` | `booklore` | Name of the database to create on first run. This database will be used by BookLore to store all application data. Should not be changed after initial setup. |
194
-
| `MYSQL_USER` | `booklore` | Username for the application database user. Must match `DATABASE_USERNAME` in the BookLore container configuration. This user will have full access to the `MYSQL_DATABASE`. |
195
-
| `MYSQL_PASSWORD` | - | Password for the application database user. **Required**. Use a strong, unique password. Must match `DATABASE_PASSWORD` in the BookLore container configuration. Store securely and never commit to VCS. |
196
-
197
182
## 📥 Bookdrop Folder: Auto-Import Files
198
183
199
184
BookLore now supports a **Bookdrop folder**, a special directory where you can drop your book files (`.pdf`, `.epub`, `.cbz`, etc.), and BookLore will automatically detect, process, and prepare them for import. This makes it easy to bulk add new books without manually uploading each one.
0 commit comments