style: tf formatting

This commit is contained in:
Yuris Cakranegara
2025-08-17 22:25:55 +10:00
parent 8ee71193bb
commit c59ebbcc8b
10 changed files with 65 additions and 65 deletions

View File

@@ -73,7 +73,7 @@ resource "cloudflare_zero_trust_tunnel_cloudflared_config" "this" {
} }
module "dns_records" { module "dns_records" {
source = "../../10-services-generic/cloudflare-dns" source = "../../10-services-generic/cloudflare-dns"
zone_id = var.cloudflare_zone_id zone_id = var.cloudflare_zone_id
hostnames = [ hostnames = [
for rule in local.all_ingress_rules : for rule in local.all_ingress_rules :

View File

@@ -71,7 +71,7 @@ resource "docker_container" "service_container" {
# Set the network mode (bridge, host, etc.) # Set the network mode (bridge, host, etc.)
network_mode = local.network_mode network_mode = local.network_mode
# Add host mappings (entries for /etc/hosts) # Add host mappings (entries for /etc/hosts)
dynamic "host" { dynamic "host" {
for_each = var.host_mappings for_each = var.host_mappings
@@ -139,15 +139,15 @@ resource "docker_container" "service_container" {
cpu_shares = var.cpu_shares cpu_shares = var.cpu_shares
# Other container options # Other container options
dns = var.dns dns = var.dns
dns_search = var.dns_search dns_search = var.dns_search
hostname = var.hostname hostname = var.hostname
domainname = var.domainname domainname = var.domainname
user = var.user user = var.user
working_dir = var.working_dir working_dir = var.working_dir
command = var.command command = var.command
entrypoint = var.entrypoint entrypoint = var.entrypoint
privileged = var.privileged privileged = var.privileged
destroy_grace_seconds = var.destroy_grace_seconds destroy_grace_seconds = var.destroy_grace_seconds
# Set log options # Set log options

View File

@@ -201,8 +201,8 @@ variable "log_driver" {
variable "log_opts" { variable "log_opts" {
description = "Log driver options" description = "Log driver options"
type = map(string) type = map(string)
default = { default = {
max-size = "10m" max-size = "10m"
max-file = "3" max-file = "3"
} }
} }

View File

@@ -46,7 +46,7 @@ output "service_definition" {
name = local.container_name name = local.container_name
primary_port = local.exposed_port primary_port = local.exposed_port
endpoint = "http://${local.container_name}:${local.exposed_port}" endpoint = "http://${local.container_name}:${local.exposed_port}"
subdomains = local.subdomains subdomains = local.subdomains
publish_via = "tunnel" publish_via = "tunnel"
} }
} }

View File

@@ -42,13 +42,13 @@ variable "timezone" {
} }
locals { locals {
container_name = "calibre-web-automated" container_name = "calibre-web-automated"
calibre_image = "crocodilestick/calibre-web-automated" calibre_image = "crocodilestick/calibre-web-automated"
calibre_tag = var.image_tag calibre_tag = var.image_tag
monitoring = true monitoring = true
env_file = "${path.module}/.env" env_file = "${path.module}/.env"
calibre_internal_port = 8083 calibre_internal_port = 8083
docker_mods = "lscr.io/linuxserver/mods:universal-calibre-v7.16.0" docker_mods = "lscr.io/linuxserver/mods:universal-calibre-v7.16.0"
# Define volumes # Define volumes
calibre_volumes = [ calibre_volumes = [

View File

@@ -58,17 +58,17 @@ locals {
} }
module "copyparty" { module "copyparty" {
source = "../../10-services-generic/docker-service" source = "../../10-services-generic/docker-service"
container_name = local.container_name container_name = local.container_name
image = local.image image = local.image
tag = local.tag tag = local.tag
user = local.user user = local.user
volumes = local.volumes volumes = local.volumes
env_vars = local.env_vars env_vars = local.env_vars
networks = var.networks networks = var.networks
monitoring = local.monitoring monitoring = local.monitoring
destroy_grace_seconds = 15 destroy_grace_seconds = 15
ports = [ ports = [
{ {
internal = local.internal_port internal = local.internal_port
external = local.internal_port external = local.internal_port

View File

@@ -24,13 +24,13 @@ variable "networks" {
} }
locals { locals {
container_name = "crawl4ai" container_name = "crawl4ai"
image = "unclecode/crawl4ai" image = "unclecode/crawl4ai"
image_tag = var.image_tag image_tag = var.image_tag
monitoring = true monitoring = true
service_port = provider::dotenv::get_by_key("PORT", local.env_file) service_port = provider::dotenv::get_by_key("PORT", local.env_file)
env_file = "${path.module}/.env" env_file = "${path.module}/.env"
# Define volumes # Define volumes
default_volumes = [ default_volumes = [
{ {
@@ -56,15 +56,15 @@ locals {
# Environment variables # Environment variables
env_vars = { env_vars = {
OPENAI_API_KEY = provider::dotenv::get_by_key("OPENAI_API_KEY", local.env_file) OPENAI_API_KEY = provider::dotenv::get_by_key("OPENAI_API_KEY", local.env_file)
DEEPSEEK_API_KEY = provider::dotenv::get_by_key("DEEPSEEK_API_KEY", local.env_file) DEEPSEEK_API_KEY = provider::dotenv::get_by_key("DEEPSEEK_API_KEY", local.env_file)
ANTHROPIC_API_KEY = provider::dotenv::get_by_key("ANTHROPIC_API_KEY", local.env_file) ANTHROPIC_API_KEY = provider::dotenv::get_by_key("ANTHROPIC_API_KEY", local.env_file)
GROQ_API_KEY = provider::dotenv::get_by_key("GROQ_API_KEY", local.env_file) GROQ_API_KEY = provider::dotenv::get_by_key("GROQ_API_KEY", local.env_file)
TOGETHER_API_KEY = provider::dotenv::get_by_key("TOGETHER_API_KEY", local.env_file) TOGETHER_API_KEY = provider::dotenv::get_by_key("TOGETHER_API_KEY", local.env_file)
MISTRAL_API_KEY = provider::dotenv::get_by_key("MISTRAL_API_KEY", local.env_file) MISTRAL_API_KEY = provider::dotenv::get_by_key("MISTRAL_API_KEY", local.env_file)
GEMINI_API_TOKEN = provider::dotenv::get_by_key("GEMINI_API_TOKEN", local.env_file) GEMINI_API_TOKEN = provider::dotenv::get_by_key("GEMINI_API_TOKEN", local.env_file)
} }
# Healthcheck configuration # Healthcheck configuration
healthcheck = { healthcheck = {
test = ["CMD", "curl", "-f", "http://localhost:${local.service_port}/health"] test = ["CMD", "curl", "-f", "http://localhost:${local.service_port}/health"]

View File

@@ -133,17 +133,17 @@ locals {
] ]
n8n_mcp_env_vars = { n8n_mcp_env_vars = {
MCP_MODE = "http" MCP_MODE = "http"
USE_FIXED_HTTP = "true" USE_FIXED_HTTP = "true"
AUTH_TOKEN = provider::dotenv::get_by_key("N8N_MCP_AUTH_TOKEN", local.env_file) AUTH_TOKEN = provider::dotenv::get_by_key("N8N_MCP_AUTH_TOKEN", local.env_file)
N8N_API_URL = "http://${local.container_name}:${local.n8n_internal_port}" N8N_API_URL = "http://${local.container_name}:${local.n8n_internal_port}"
N8N_API_KEY = provider::dotenv::get_by_key("N8N_API_KEY", local.env_file) N8N_API_KEY = provider::dotenv::get_by_key("N8N_API_KEY", local.env_file)
NODE_ENV = "production" NODE_ENV = "production"
LOG_LEVEL = "info" LOG_LEVEL = "info"
PORT = local.n8n_mcp_internal_port PORT = local.n8n_mcp_internal_port
NODE_DB_PATH = "/app/data/nodes.db" NODE_DB_PATH = "/app/data/nodes.db"
REBUILD_ON_START = "false" REBUILD_ON_START = "false"
GENERIC_TIMEZONE = module.system_globals.timezone GENERIC_TIMEZONE = module.system_globals.timezone
} }
n8n_mcp_healthcheck = { n8n_mcp_healthcheck = {

View File

@@ -42,7 +42,7 @@ locals {
postgres_user = provider::dotenv::get_by_key("DB_USERNAME", local.env_file) postgres_user = provider::dotenv::get_by_key("DB_USERNAME", local.env_file)
postgres_password = provider::dotenv::get_by_key("DB_PASSWORD", local.env_file) postgres_password = provider::dotenv::get_by_key("DB_PASSWORD", local.env_file)
postgres_db = provider::dotenv::get_by_key("DB_DATABASE", local.env_file) postgres_db = provider::dotenv::get_by_key("DB_DATABASE", local.env_file)
# Define volumes # Define volumes
nocodb_volumes = [ nocodb_volumes = [
{ {
@@ -51,7 +51,7 @@ locals {
read_only = false read_only = false
} }
] ]
postgres_volumes = [ postgres_volumes = [
{ {
host_path = "${var.volume_path}/postgres/data" host_path = "${var.volume_path}/postgres/data"
@@ -62,9 +62,9 @@ locals {
# Environment variables for postgres # Environment variables for postgres
postgres_env_vars = { postgres_env_vars = {
POSTGRES_USER = local.postgres_user POSTGRES_USER = local.postgres_user
POSTGRES_PASSWORD = local.postgres_password POSTGRES_PASSWORD = local.postgres_password
POSTGRES_DB = local.postgres_db POSTGRES_DB = local.postgres_db
POSTGRES_INITDB_ARGS = "--data-checksums" POSTGRES_INITDB_ARGS = "--data-checksums"
POSTGRES_HOST_AUTH_METHOD = "trust" POSTGRES_HOST_AUTH_METHOD = "trust"
} }

View File

@@ -39,8 +39,8 @@ module "calibre" {
} }
module "copyparty" { module "copyparty" {
source = "${local.module_dir}/20-services-apps/copyparty" source = "${local.module_dir}/20-services-apps/copyparty"
fileshare_path = "${local.root_volume}" fileshare_path = local.root_volume
config_path = "${local.volume_host}/copyparty" config_path = "${local.volume_host}/copyparty"
networks = [module.homelab_docker_network.name] networks = [module.homelab_docker_network.name]
} }