From 609a315c25b79230bb9b7be3e439f973cd82d7ce Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Mon, 27 Jul 2026 16:18:05 -0700 Subject: [PATCH] Adding "instance-up" deployment status. --- .../authelia/4/authelia-config/users.yml.tmpl | 7 ++++++ .../authelia/4/make-authelia-users-config.sh | 24 +++++++++++++++++++ src/db.scm | 4 +++- .../10-adding-deployments-instance-up-up.sql | 1 + 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 all-apps/authelia/4/authelia-config/users.yml.tmpl create mode 100755 all-apps/authelia/4/make-authelia-users-config.sh create mode 100644 src/migrations/10-adding-deployments-instance-up-up.sql diff --git a/all-apps/authelia/4/authelia-config/users.yml.tmpl b/all-apps/authelia/4/authelia-config/users.yml.tmpl new file mode 100644 index 0000000..5303729 --- /dev/null +++ b/all-apps/authelia/4/authelia-config/users.yml.tmpl @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=https://www.authelia.com/schemas/latest/json-schema/user-database.json +users: + admin: + disabled: false + displayname: 'Admin' + password: '$HOST_ADMIN_PASSWORD' + email: '$HOST_ADMIN_USER' diff --git a/all-apps/authelia/4/make-authelia-users-config.sh b/all-apps/authelia/4/make-authelia-users-config.sh new file mode 100755 index 0000000..22b121a --- /dev/null +++ b/all-apps/authelia/4/make-authelia-users-config.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Copyright 2025-2026 Thomas Hintz + +# This file is part of Nassella. + +# Nassella is free software: you can redistribute it and/or modify it under the +# terms of the GNU Affero General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) any +# later version. + +# Nassella is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with Nassella. If not, see . + +set -e +set -a # export everything in the config for later use by envsubst + +. $1 # source the apps.config file with then env vars + +envsubst < app/authelia/authelia-config/users.yml.tmpl > app/authelia/authelia-config/users.yml diff --git a/src/db.scm b/src/db.scm index d472491..bc44a14 100644 --- a/src/db.scm +++ b/src/db.scm @@ -417,6 +417,7 @@ where usa.user_id=$1 and usa.instance_id=$2;" (volume-create . "terraform_volume_create") (volume-destroy . "terraform_volume_destroy") (instance-backup . "instance_backup") + (instance-up . "instance_up") (status . "status") (id . "id") (instance-id . "instance_id"))) @@ -662,7 +663,8 @@ where user_id=$1;" (6 . "adding-lldap-app") (7 . "adding-authelia-app") (8 . "adding-backblaze-bucket-name-and-id") - (9 . "extend-deployment-status-add-ignored"))) + (9 . "extend-deployment-status-add-ignored") + (10 . "adding-deployments-instance-up"))) (define (run-pending-migrations conn) (let* ((migration-ids (sort (map car *migrations*) <)) diff --git a/src/migrations/10-adding-deployments-instance-up-up.sql b/src/migrations/10-adding-deployments-instance-up-up.sql new file mode 100644 index 0000000..8bc3ed8 --- /dev/null +++ b/src/migrations/10-adding-deployments-instance-up-up.sql @@ -0,0 +1 @@ +alter table deployments add instance_up deployment_status not null default 'queued';