Files
app/Makefile

30 lines
1.1 KiB
Makefile
Raw Normal View History

2025-08-16 15:50:14 -07:00
TERRAFORM_ENV=production
2025-08-11 13:26:21 -07:00
2025-08-16 15:50:14 -07:00
# .dirstamp plus && $@ is like make magic to get this rule
# to only run if the contents of all-apps changes
app/.dirstamp: all-apps/app.service all-apps/docker-compose.yaml $(wildcard all-apps/lb/*) $(wildcard all-apps/Nextcloud/*) $(wildcard all-apps/wg-easy/*)
rm -Rf app/
cp -a all-apps app && touch $@
2025-08-11 13:26:21 -07:00
2025-08-19 16:40:43 -07:00
all-apps/lb/Caddyfile: apps.config make-caddyfile.sh
./make-caddyfile.sh > all-apps/lb/Caddyfile
ignition.json: cl.yaml app/.dirstamp all-apps/lb/Caddyfile
2025-08-16 15:50:14 -07:00
cat cl.yaml | sudo docker run --rm --volume /home/tjhintz/.ssh/id_rsa.pub:/pwd/ssh-keys --volume ${PWD}:/pwd --workdir /pwd -i quay.io/coreos/butane:latest -d /pwd > ignition.json
2025-08-11 13:26:21 -07:00
2025-08-16 15:50:14 -07:00
plan: ignition.json
terraform plan -var-file $(TERRAFORM_ENV).tfvars
apply: ignition.json
terraform apply -var-file $(TERRAFORM_ENV).tfvars
## to help me remember the command to run to test the config locally
2025-08-11 13:26:21 -07:00
testlocalhost:
curl -k --resolve localhost:443:146.190.12.129 https://localhost
2025-08-16 15:50:14 -07:00
flatcarbuild: ignition.json
cp --reflink=auto flatcar/flatcar_production_qemu_image.img.fresh flatcar/flatcar_production_qemu_image.img
flatcarrun:
./flatcar/flatcar_production_qemu.sh -i ignition.json