mirror of
https://github.com/gotson/komga.git
synced 2025-01-08 11:47:47 +08:00
simplify docker configuration
This commit is contained in:
parent
d29386280a
commit
f851f0d315
@ -70,7 +70,7 @@ Each configuration key can have a different format depending if it's from the en
|
||||
|
||||
### Mandatory configuration
|
||||
|
||||
In order to make Komga run, you need to specify some mandatory configuration keys:
|
||||
In order to make Komga run, you need to specify some mandatory configuration keys (unless you use Docker, in which case defaults are setup):
|
||||
|
||||
- `SPRING_PROFILES_ACTIVE` / `spring.profiles.active`: `prod` - this will enable the database management and upgrades for new versions.
|
||||
- `SPRING_DATASOURCE_URL` / `spring.datasource.url`: the path of the database file. For Docker I use `jdbc:h2:/config/database.h2;DB_CLOSE_DELAY=-1`, where `/config/database.h2` is the actual file inside the docker container. You can customize this part if running without docker.
|
||||
|
@ -11,10 +11,6 @@ services:
|
||||
ports:
|
||||
- 8090:8080
|
||||
environment:
|
||||
- SPRING_PROFILES_ACTIVE=prod
|
||||
- SPRING_DATASOURCE_URL=jdbc:h2:/config/database.h2;DB_CLOSE_DELAY=-1
|
||||
- KOMGA_ROOT_FOLDER=/books
|
||||
- KOMGA_ROOT_FOLDER_SCAN_CRON=0 0 * * * ? # periodic scan every hour
|
||||
- KOMGA_USER_PASSWORD=your-admin-password
|
||||
- KOMGA_ADMIN_PASSWORD=your-user-password
|
||||
restart: unless-stopped
|
||||
|
@ -4,4 +4,5 @@ ARG DEPENDENCY=target/dependency
|
||||
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
|
||||
COPY ${DEPENDENCY}/META-INF /app/META-INF
|
||||
COPY ${DEPENDENCY}/BOOT-INF/classes /app
|
||||
ENV SPRING_PROFILES_ACTIVE=docker
|
||||
ENTRYPOINT ["java","-cp","app:app/lib/*","org.gotson.komga.ApplicationKt"]
|
8
komga/src/main/resources/application-docker.yml
Normal file
8
komga/src/main/resources/application-docker.yml
Normal file
@ -0,0 +1,8 @@
|
||||
spring:
|
||||
profiles:
|
||||
include: prod
|
||||
datasource:
|
||||
url: jdbc:h2:/config/database.h2;DB_CLOSE_DELAY=-1
|
||||
komga:
|
||||
root-folder: /books
|
||||
root-folder-scan-cron: "0 */15 * * * ?"
|
Loading…
Reference in New Issue
Block a user