diff --git a/README.md b/README.md index 6cf0a4c5..27112c57 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/doc/docker-compose.yml b/doc/docker-compose.yml index 059eced3..374ebfe1 100644 --- a/doc/docker-compose.yml +++ b/doc/docker-compose.yml @@ -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 diff --git a/komga/Dockerfile b/komga/Dockerfile index 6d650541..37b19858 100644 --- a/komga/Dockerfile +++ b/komga/Dockerfile @@ -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"] \ No newline at end of file diff --git a/komga/build.gradle.kts b/komga/build.gradle.kts index 92d998d2..32ba7d6a 100644 --- a/komga/build.gradle.kts +++ b/komga/build.gradle.kts @@ -105,7 +105,10 @@ tasks { } configure { - name = "gotson/komga:latest" + name = "gotson/komga" + tag("latest", "$name:latest") + tag("semVer", "$name:$version") + tag("beta", "$name:beta") copySpec.from(tasks.getByName("unpack").outputs).into("dependency") buildArgs(mapOf("DEPENDENCY" to "dependency")) dependsOn(tasks.getByName("clean"), tasks.getByName("test")) diff --git a/komga/src/main/resources/application-docker.yml b/komga/src/main/resources/application-docker.yml new file mode 100644 index 00000000..f33e3e54 --- /dev/null +++ b/komga/src/main/resources/application-docker.yml @@ -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 * * * ?"