diff --git a/.gitignore b/.gitignore index b86c7c5..8608dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ docker-compose.yml /services/40-keycloak/volume/realm/realm-export.json +/services/50-komga/volume + /services/50-nextcloud/volume/data /services/50-nextcloud/volume/html /services/50-nextcloud/volume/app diff --git a/env/.env b/env/.env index 933c762..3d311cc 100644 --- a/env/.env +++ b/env/.env @@ -172,6 +172,12 @@ DOKUWIKI_ACTIVATE=0 DOKUWIKI_LOCAL=1 DOKUWIKI_URL=${PROTOCOLE}://${WEB_URL}/dokuwiki +# KOMGA +KOMGA_SERVICE_NAME=komga +KOMGA_ACTIVATE=0 +KOMGA_LOCAL=1 +KOMGA_URL=${PROTOCOLE}://${WEB_URL}/komga + # NEXTCLOUD NEXTCLOUD_SERVICE_NAME=nextcloud NEXTCLOUD_ACTIVATE=1 diff --git a/services/50-komga/apache/apache.conf b/services/50-komga/apache/apache.conf new file mode 100644 index 0000000..679b729 --- /dev/null +++ b/services/50-komga/apache/apache.conf @@ -0,0 +1,4 @@ + +# Konga +ProxyPass /komga http://komga:25600/komga retry=0 keepalive=On +ProxyPassReverse /komga http://komga:25600/komga retry=0 \ No newline at end of file diff --git a/services/50-komga/dockercompose/dockercompose.yml b/services/50-komga/dockercompose/dockercompose.yml new file mode 100644 index 0000000..3b107a7 --- /dev/null +++ b/services/50-komga/dockercompose/dockercompose.yml @@ -0,0 +1,18 @@ +services: + # Komga + # Biobliotheque ebook + # Port interne 25600 + komga: + image: gotson/komga + container_name: nine-komga + restart: unless-stopped + env_file: ./services/50-komga/env/.env.merge + user: "1000:1000" + networks: + - nine-network + volumes: + - ./services/50-komga/volume/data:/data:rw + - ./services/50-komga/volume/config:/config:rw + - ./services/50-komga/volume/ebook:/ebook:rw + + diff --git a/services/50-komga/env/.env b/services/50-komga/env/.env new file mode 100644 index 0000000..1d56134 --- /dev/null +++ b/services/50-komga/env/.env @@ -0,0 +1,5 @@ + +# == KOMGA ================================================================================================================================ + +TZ=Europe/Paris +SERVER_SERVLET_CONTEXT_PATH=/komga diff --git a/services/50-komga/misc/nine.sh b/services/50-komga/misc/nine.sh new file mode 100644 index 0000000..463256f --- /dev/null +++ b/services/50-komga/misc/nine.sh @@ -0,0 +1,35 @@ +#!/bin/bash + + +function upkomga { + if [[ $KOMGA_ACTIVATE == 1 && $KOMGA_LOCAL == 1 ]] + then + Title ${KOMGA_SERVICE_NAME^^} + + EchoVert "CONTAINER" + upservice ${KOMGA_SERVICE_NAME} + chmod -R a+wr ./services/50-komga/volume + Echo + fi +} + +function destroykomga { + if [[ $KOMGA_LOCAL == 1 ]] + then + Title "DESTROY $KOMGA_SERVICE_NAME" + + stop $KOMGA_SERVICE_NAME 1 + docker-compose rm -s -v -f "$KOMGA_SERVICE_NAME" + + if [[ -z $1 ]]; then + Question_ouinon "Souhaitez-vous supprimer les volumes associés à $KOMGA_SERVICE_NAME ?"; + response=$? + fi + if [[ "$response" == 0 || ! -z $1 ]] + then + rm -rf services/50-komga/volume + fi + + echo "" + fi +} \ No newline at end of file diff --git a/services/50-komga/tmpl/application.yml b/services/50-komga/tmpl/application.yml new file mode 100644 index 0000000..5c7893d --- /dev/null +++ b/services/50-komga/tmpl/application.yml @@ -0,0 +1,29 @@ +spring: + security: + oauth2: + client: + registration: + keycloak: + provider: keycloak # this must match the provider below + client-id: komga + client-secret: XXJQwHX4YEQJpGez3nymBh6PgSby3fz9 + client-name: keycloak + scope: openid,email + authorization-grant-type: authorization_code + # the placeholders in {} will be replaced automatically, you don't need to change this line + redirect-uri: "{baseUrl}/{action}/oauth2/code/{registrationId}" + provider: + keycloak: # this must match the provider above + user-name-attribute: sub + # either set the issuer-uri, in which case the app will lookup the configuration for you automatically + issuer-uri: https://nine.local/auth/realms/nine + # or set all of the following + authorization-uri: https://nine.local/auth/realms/nine/protocol/openid-connect/auth + token-uri: https://nine.local/auth/realms/nine/protocol/openid-connect/token + jwk-set-uri: https://nine.local/auth/realms/nine/protocol/openid-connect/certs + user-info-uri: https://nine.local/auth/realms/nine/protocol/openid-connect/userinfo + ssl: + enabled: false + webclient: + ssl: + trust-all: true \ No newline at end of file