feat: Swapped tofu init scripting for ansible scripting

This commit is contained in:
2026-07-13 21:23:31 +01:00
parent cf5504281c
commit c12a507fc1
34 changed files with 471 additions and 501 deletions
-33
View File
@@ -1,33 +0,0 @@
# Generated by OpenTofu from var.dev_runner_count - do not hand-edit.
# To change the number of runners, edit dev_runner_count in terraform.tfvars and
# run tofu apply. To change their shape, edit
# infra/modules/dev/templates/runners-docker-compose.yml.tftpl instead.
#
# GITEA_RUNNER_REGISTRATION_TOKEN is intentionally left as a compose variable
# (not baked in here) - services/dev/spinup.sh generates a fresh token and
# writes it to Runners/.env immediately before starting these containers.
#
# /data lives on dev's volume (/mnt/HC_Volume_PENDING_TOFU_APPLY) so runner
# identity survives a server rebuild - baked in directly rather than via .env,
# since Runners/.env is already reserved for the registration token above and
# gets overwritten on every deploy.
services:
runner-1:
image: gitea/act_runner:latest
container_name: gitea_runner_1
volumes:
- ./config.yaml:/config.yaml
- /mnt/HC_Volume_PENDING_TOFU_APPLY/gitea_runner_1:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- proxy
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "https://git.luke-else.co.uk"
GITEA_RUNNER_REGISTRATION_TOKEN: "${GITEA_RUNNER_REGISTRATION_TOKEN}"
GITEA_RUNNER_NAME: "CICD#1"
restart: unless-stopped
networks:
proxy:
external: true
+1 -1
View File
@@ -4,7 +4,7 @@ set -e
cd "$(dirname "$0")"
if [ ! -f .env ]; then
echo "Missing .env (expected DATA_DIR=/mnt/HC_Volume_...) - run 'tofu apply' in infra/ first, then re-copy this directory." >&2
echo "Missing .env (expected DATA_DIR=/mnt/HC_Volume_...) - run 'ansible-playbook playbooks/deploy.yml' in ansible/ first." >&2
exit 1
fi