refactor: simplify project structure

This commit is contained in:
Yuris Cakranegara
2025-06-07 14:58:28 +10:00
parent 3ed0b402f5
commit c4775366e8
42 changed files with 441 additions and 1024 deletions

30
services/main.tf Normal file
View File

@@ -0,0 +1,30 @@
locals {
module_dir = "../modules"
data_dir = module.system_globals.data_dir
}
module "system_globals" {
source = "${local.module_dir}/00-globals/system"
}
// Docker network used for modules that needs to be exposed to the internet
// using Cloudflared
module "homelab_docker_network" {
source = "${local.module_dir}/01-networking/docker-network"
name = "homelab-network"
driver = "bridge"
attachable = true
subnet = "10.100.0.0/16"
}
module "actualbudget" {
source = "${local.module_dir}/20-services-apps/actualbudget"
volume_path = "${local.data_dir}/actual"
networks = [module.homelab_docker_network.name]
}
module "emulatorjs" {
source = "${local.module_dir}/20-services-apps/emulatorjs"
volume_path = "${local.data_dir}/emulatorjs"
}