From 26b8841101ba82233c5f5fe698f9c1a8a56eb465 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Wed, 8 Jun 2022 12:59:43 +0200 Subject: [PATCH] foo --- docs/apps/gitea.md | 58 +++++++++++++++++++++++++++++++++++++++++ docs/apps/keycloak.md | 23 ++++++++++++++++ docs/apps/matrix.md | 31 ++++++++++++++++++++++ docs/apps/nextcloud.md | 12 +++++++-- docs/apps/onlyoffice.md | 7 ++++- 5 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 docs/apps/gitea.md create mode 100644 docs/apps/keycloak.md create mode 100644 docs/apps/matrix.md diff --git a/docs/apps/gitea.md b/docs/apps/gitea.md new file mode 100644 index 0000000..3db43b2 --- /dev/null +++ b/docs/apps/gitea.md @@ -0,0 +1,58 @@ + +``` +abra app new gitea +abra app config +abra app deploy git.example.org +abra app config proxy.example.org +# enable the gitea ssh port forward +``` + + + +``` +docker exec --user git gitea_server_1 gitea + admin auth add-oauth + --name keycloak + --provider openidConnect + --key gitea + --secret ${OAUTH_SECRET} + --auto-discover-url https://login.example.org/auth/realms/master/.well-known/openid-configuration +``` + + +## backup / migration stuff + +https://docs.gitea.io/en-us/backup-and-restore/ + + +### create dump + + +``` +docker exec -it -u git -w /tmp/tmp.dHKOjb/ gitea_app_1 bash -c '/app/gitea/gitea dump -c /data/gitea/conf/app.ini' +docker cp gitea_app_1:/tmp/tmp.dHKOjb/ . +``` + + +### restore from backup + +transfer secrets from app.ini to abra secret insert + +``` +unzip gitea-dump-1234.zip + +# app +abra app cp git.example.org gitea-dump-1234.zip app:/tmp +abra app run -u git git.example.org app bash +$ cd /tmp && unzip gitea-dump-1234.zip +$ mv data /var/lib/gitea/data +$ mv repos /var/lib/gitea/git/repositories + +# db +abra app cp git.example.org gitea-db.sql db:/tmp +abra app run git.example.org db bash +$ psql -U gitea -d gitea < /tmp/gitea-db.sql +``` + +gitea doctor --fix --run fix-broken-repo-units + diff --git a/docs/apps/keycloak.md b/docs/apps/keycloak.md new file mode 100644 index 0000000..c2b2d71 --- /dev/null +++ b/docs/apps/keycloak.md @@ -0,0 +1,23 @@ + + +### migration + +https://www.keycloak.org//docs/latest/upgrading/index.html#_upgrading + +https://www.keycloak.org//docs/latest/upgrading/index.html#migration-changes + +https://wjw465150.gitbooks.io/keycloak-documentation/content/server_admin/topics/export-import.html + +export with: +dc run app -Dkeycloak.migration.action=export -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/opt/jboss/export-2022-05-18.json + + +import: +copy export.json to volume folder +extend compose.yml with command: "-Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/opt/jboss/keycloak/themes/export.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING" + +copy theme to theme volume +set welcome_theme env variable + + + diff --git a/docs/apps/matrix.md b/docs/apps/matrix.md new file mode 100644 index 0000000..b2aadfa --- /dev/null +++ b/docs/apps/matrix.md @@ -0,0 +1,31 @@ +# Matrix + +### deployment + +``` +abra app new matrix-synapse +abra app config matrix.example.org +abra app deploy matrix.example.org +abra app new element-web +abra app config chat.example.org +abra app deploy chat.example.org +``` + + +## Migration + + +### Backup + + +### Restore + +secrets importieren +signing-key kopieren +media-store kopien /data/media_store +db dump importieren + +check that user 991 has ownership of /data/media_store + + + diff --git a/docs/apps/nextcloud.md b/docs/apps/nextcloud.md index edab5bd..fd9aa40 100644 --- a/docs/apps/nextcloud.md +++ b/docs/apps/nextcloud.md @@ -141,10 +141,17 @@ $ mysql -u root -p"$(cat /run/secrets/db_root_password)" nextcloud < /tmp/backup ``` !!! note "Bei Postgres DB" - `/usr/bin/pg_restore -c -U nextcloud -d nextcloud < /tmp/backup/dump.sql` - TODO: Check this + + ``` + PGPASSWORD="password" psql -h [server] -U [username] -d template1 -c "DROP DATABASE \"nextcloud\";" + PGPASSWORD="password" psql -h [server] -U [username] -d template1 -c "CREATE DATABASE \"nextcloud\";" + /usr/bin/pg_restore -c -U nextcloud -d nextcloud < /tmp/backup/dump.sql + ``` + git + Wartungs-Modus aktivieren + ``` abra app run --user www-data yksflip-cloud app /var/www/html/occ maintenance:data-fingerprint abra app run --user www-data yksflip-cloud app /var/www/html/occ maintenance:mode --on @@ -155,3 +162,4 @@ Falls nötig kann auch ein repair gestartet werden: ``` abra app run --user www-data yksflip-cloud app /var/www/html/occ maintenance:repair ``` + diff --git a/docs/apps/onlyoffice.md b/docs/apps/onlyoffice.md index 706967e..fe04642 100644 --- a/docs/apps/onlyoffice.md +++ b/docs/apps/onlyoffice.md @@ -17,8 +17,11 @@ JWT_SECRET https://api.onlyoffice.com/editors/save#forcesave -im onlyoffice container / volume hinzufügen: +` abra app run office.local-it.org app bash` +in folgender Datei hinzufügen: + +``` /etc/onlyoffice/documentserver/local.json { "services": { @@ -28,6 +31,8 @@ im onlyoffice container / volume hinzufügen: "interval": "5m" } +``` + in Nextcloud -> Admin -> Onlyoffice -> Editor-Einstellungen -> force save \ No newline at end of file