simplify docker configuration

This commit is contained in:
Gauthier Roebroeck 2019-08-27 13:57:37 +08:00
parent d29386280a
commit f851f0d315
4 changed files with 10 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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"]

View 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 * * * ?"