add komga

This commit is contained in:
afornerot 2024-12-27 16:39:11 +01:00
parent b4a318ae28
commit 153e816ad6
7 changed files with 99 additions and 0 deletions

2
.gitignore vendored
View File

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

6
env/.env vendored
View File

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

View File

@ -0,0 +1,4 @@
# Konga
ProxyPass /komga http://komga:25600/komga retry=0 keepalive=On
ProxyPassReverse /komga http://komga:25600/komga retry=0

View File

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

5
services/50-komga/env/.env vendored Normal file
View File

@ -0,0 +1,5 @@
# == KOMGA ================================================================================================================================
TZ=Europe/Paris
SERVER_SERVLET_CONTEXT_PATH=/komga

View File

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

View File

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