Add minor variablilization for service fefan and bookshelf

This commit is contained in:
2026-02-06 11:51:06 +01:00
parent 83d6fe194b
commit 3d6793a843
7 changed files with 59 additions and 17 deletions

23
main.tf
View File

@@ -152,3 +152,26 @@ module "fefan" {
ssh_public_key = var.ssh_public_key
proxmox_host_ip = var.proxmox_host_ip
}
# module "keycloak" {
# source = "./modules/apps/keycloak"
# providers = {}
# vm_ip_address = "192.168.1.93"
# depends_on = []
# name = "keycloak"
# hostname = "keycloak"
# domain = "aldon.fr"
# vm_id = 214
# node_name = "mop"
# template_id = 103
# cores = 1
# memory = 2048
# balloon = 1024
# disk_size = 16
# ssh_public_key = var.ssh_public_key
# proxmox_host_ip = var.proxmox_host_ip
# }

View File

@@ -6,6 +6,7 @@ ACT_RUNNER_VERSION=0.2.13
ACT_RUNNER_LOCATION=/usr/local/bin
ACT_RUNNER_USER=act_runner
GITEA_RUNNER_REGISTRATION_TOKEN=<gitea-repository-runner-token>
USERNAME=bookshelf
# gitea instance
GITEA_INSTANCE_URL=https://gitea.aldon.fr
@@ -23,9 +24,6 @@ SERVICE_ORIGIN=https://bookshelf.aldon.fr
SERVICE_ROOT_FQDN=https://bookshelf.aldon.fr/api
SERVICE_DATABASE_CONTAINER_NAME=bookshelf-database
# VM
USERNAME=bookshelf
# Backup specifics
SERVICE_BACKUPS_DIR=/backups/bookshelf
SERVICE_BACKUPS_PREFIX=bookshelf-dump

View File

@@ -58,11 +58,11 @@ write_files:
permissions: "0644"
content: |
${act_runner-service}
- path: /opt/bookshelf/install-runner.sh
- path: /opt/${hostname}/install-runner.sh
permissions: "0755"
content: |
${act_runner-install-script}
- path: /opt/bookshelf/install-service.sh
- path: /opt/${hostname}/install-service.sh
permissions: "0755"
content: |
${service-install-script}
@@ -77,12 +77,12 @@ runcmd:
- systemctl start docker
- usermod -aG docker ${hostname}
# Act_runner install
- /opt/bookshelf/install-runner.sh
- /opt/${hostname}/install-runner.sh
- systemctl daemon-reload
- systemctl enable act_runner.service
- systemctl start act_runner.service
# Bookshelf install
- /opt/bookshelf/install-service.sh
# ${hostname} install
- /opt/${hostname}/install-service.sh
final_message: |

View File

@@ -15,7 +15,7 @@ module "vm" {
ssh_public_key = var.ssh_public_key
proxmox_host_ip = var.proxmox_host_ip
cloudinit_config = templatefile(
"${path.module}/cloud-init/service.yaml",
{

View File

@@ -6,6 +6,7 @@ ACT_RUNNER_VERSION=0.2.13
ACT_RUNNER_LOCATION=/usr/local/bin
ACT_RUNNER_USER=act_runner
GITEA_RUNNER_REGISTRATION_TOKEN=<gitea-repository-runner-token>
USERNAME=fefan
# Gitea instance
GITEA_INSTANCE_URL=https://gitea.aldon.fr
@@ -26,9 +27,6 @@ STRAPI_TRANSFER_TOKEN_SALT=
STRAPI_JWT_SECRET=
SERVICE_DATABASE_CONTAINER_NAME=fefan-db
# VM
USERNAME=fefan
# Backup specifics
SERVICE_BACKUPS_DIR=/backups/fefan
SERVICE_BACKUPS_PREFIX=fefan-dump

View File

@@ -58,11 +58,11 @@ write_files:
permissions: "0644"
content: |
${act_runner-service}
- path: /opt/fefan/install-runner.sh
- path: /opt/${hostname}/install-runner.sh
permissions: "0755"
content: |
${act_runner-install-script}
- path: /opt/fefan/install-fefan.sh
- path: /opt/${hostname}/install-service.sh
permissions: "0755"
content: |
${service-install-script}
@@ -77,12 +77,13 @@ runcmd:
- systemctl start docker
- usermod -aG docker ${hostname}
# Act_runner install
- /opt/fefan/install-runner.sh
- /opt/${hostname}/install-runner.sh
- systemctl daemon-reload
- systemctl enable act_runner.service
- systemctl start act_runner.service
# Install fefan
- /opt/fefan/install-fefan.sh
# ${hostname} install
- /opt/${hostname}/install-service.sh
final_message: |
Base system ready for ${hostname}

View File

@@ -21,6 +21,23 @@ http:
- redirect-errors
%{~ endfor }
%{~ endfor }
aldon-http:
rule: "Host(`aldon.fr`)"
entryPoints:
- web
middlewares:
- redirect-to-aldon
service: noop
aldon:
rule: "Host(`aldon.fr`)"
entryPoints:
- websecure
service: noop
tls:
certResolver: letsencrypt
middlewares:
- redirect-to-aldon
- redirect-errors
nextcloud:
rule: "Host(`nextcloud.aldon.fr`)"
entryPoints:
@@ -114,6 +131,11 @@ http:
servers:
- url: "http://127.0.0.1:8090"
middlewares:
redirect-to-aldon:
redirectRegex:
regex: "^https?://aldon.fr/(.*)"
replacement: "https://julien.aldon.fr/$1"
permanent: true
redirect-to-https:
redirectScheme:
scheme: https