4 Commits

Author SHA1 Message Date
facbb958a5 chore: publish 1.0.0+apache-2.15.0-prod release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-04-24 15:58:05 +02:00
a4f02cf0a4 fix backup label path
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-17 17:19:04 +02:00
92c3bcf27e chore: cleanup
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-24 11:50:41 +02:00
5c4f6098bf fix: backupbot labels 2023-04-24 11:49:38 +02:00
5 changed files with 15 additions and 35 deletions

View File

@ -10,9 +10,6 @@ SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_ADMIN_PASSWORD_VERSION=v1
# SSO_ENABLED=0
## only set one of those depending on which SSO you're using
# SSO_AUTHENTIK=1
# SSO_KEYCLOAK=0
# SSO_PROVIDER_URL=https://sso.example.org/
# SSO_SAML_URL=https://sso.example.org/application/saml/<application-slug>/sso/binding/redirect/
# SSO_LOGOUT_URL=https://sso.example.org/if/session-end/<application-slug>/

View File

@ -1,7 +1,7 @@
export ENTRYPOINT_CONF_VERSION=v1
export LOCAL_CONF_VERSION=v3
export LOCAL_CONF_VERSION=v1
create_admin () {
export DATABASE_URL="$DATABASE_TYPE://$DATABASE_USER:$(cat /run/secrets/db_password)@$DATABASE_HOST/$DATABASE_NAME"
/opt/kimai/bin/console kimai:create-user admin admin@example.org ROLE_SUPER_ADMIN
/opt/kimai/bin/console kimai:create-user admin admin@example.org ROLE_SUPER_ADMIN
}

View File

@ -1,7 +1,7 @@
version: '3.8'
services:
app:
image: kimai/kimai2:apache-1.29.1-prod
image: kimai/kimai2:apache-2.15.0-prod
environment:
- APP_ENV=prod
- TRUSTED_HOSTS=localhost,traefik,${DOMAIN},127.0.0.1
@ -10,13 +10,11 @@ services:
- ADMINPASS_FILE=/run/secrets/admin_password
- DATABASE_TYPE=mysql
- DATABASE_HOST=db
- DATABASE_NAME=kimai
- DATABASE_NAME=kimai?charset=utf8mb4&serverVersion=5.7
- DATABASE_USER=kimai
- DATABASE_PASSWORD_FILE=/run/secrets/db_password
- DOMAIN
- SSO_ENABLED
- SSO_KEYCLOAK
- SSO_AUTHENTIK
- SSO_PROVIDER_URL
- SSO_SAML_URL
- SSO_LOGOUT_URL
@ -38,7 +36,6 @@ services:
- admin_password
depends_on:
- db
#entrypoint: ['tail', '-f', '/dev/null']
entrypoint: /docker-entrypoint.sh
#healthcheck:
# test: curl -s -o /dev/null http://localhost:8001 || exit 1
@ -59,7 +56,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=0.3.0+apache-1.29.1-prod"
- "coop-cloud.${STACK_NAME}.version=1.0.0+apache-2.15.0-prod"
db:
image: mysql:5.7
environment:
@ -81,18 +78,19 @@ services:
# start_period: 10s
# timeout: 10s
# retries: 3
deploy:
labels:
- backupbot.backup="true"
- backupbot.backup.pre-hook='mkdir -p /tmp/backup/ && mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" kimai > /tmp/backup/backup.sql'
- backupbot.backup.post-hook="rm -rf /tmp/backup"
- backupbot.backup.path="/tmp/backup/"
- "backupbot.backup=true"
- "backupbot.backup.pre-hook=sh -c 'mysqldump --single-transaction -u root -p\"$$(cat /run/secrets/db_root_password)\" kimai > /var/lib/mysql/backup.sql'"
- "backupbot.backup.post-hook=rm -f /var/lib/mysql/backup.sql"
- "backupbot.backup.path=/var/lib/mysql/backup.sql"
volumes:
kimai_var:
kimai_public:
mariadb:
secrets:
db_password:
external: true
@ -103,10 +101,13 @@ secrets:
admin_password:
external: true
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
networks:
proxy:
external: true
internal:
configs:
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}

View File

@ -3,27 +3,14 @@ kimai:
saml:
activate: true
title: Login with SAML
{{ if eq (env "SSO_AUTHENTIK") "1" }}
mapping:
- { saml: $http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress, kimai: email }
- { saml: $http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name, kimai: alias }
roles:
attribute: http://schemas.xmlsoap.org/claims/Group
resetOnLogin: true
attribute: Roles
mapping:
# Insert your roles here (ROLE_USER is added automatically)
- { saml: admin.group, kimai: ROLE_ADMIN }
{{ else if eq (env "SSO_KEYCLOAK") "1" }}
mapping:
- { saml: $Email, kimai: email }
- { saml: $FirstName $LastName, kimai: alias }
roles:
resetOnLogin: true
attribute: Roles
mapping:
- { saml: Admins, kimai: ROLE_ADMIN }
- { saml: Management, kimai: ROLE_TEAMLEAD }
{{ end }}
connection:
# You SAML provider
# Your Authentik instance, replace https://authentik.company with your authentik URL

View File

@ -1,5 +0,0 @@
If you have SSO enabled this upgrade will break unless you add
`SSO_KEYCLOAK=1` or `SSO_AUTHENTIK=1` in your env file for kimai!
This allows us to support both SSO methods
knoflook @ kotec.pl