Housekeeping

This commit is contained in:
Greyscale 2025-02-14 21:30:49 +01:00
parent fb3a77f526
commit 641e76cf9d
Signed by: grey
GPG key ID: DDB392AE64B32D89
10 changed files with 24 additions and 9 deletions
products

View file

@ -8,4 +8,7 @@ output "registry_user_login" {
} }
output "domain" { output "domain" {
value = var.domain value = var.domain
}
output "endpoint" {
value = "https://${var.domain}"
} }

View file

@ -1,5 +1,6 @@
module "frigate" { module "frigate" {
source = "../../docker/service" source = "../../docker/service"
enable = var.enable
image = "ghcr.io/blakeblackshear/frigate:stable" image = "ghcr.io/blakeblackshear/frigate:stable"
stack_name = var.stack_name stack_name = var.stack_name
service_name = "frigate" service_name = "frigate"
@ -9,6 +10,7 @@ module "frigate" {
environment_variables = { environment_variables = {
FRIGATE_RTSP_PASSWORD = var.frigate_rtsp_password FRIGATE_RTSP_PASSWORD = var.frigate_rtsp_password
} }
networks = var.networks
labels = var.labels labels = var.labels
converge_enable = false converge_enable = false
} }

View file

@ -6,6 +6,7 @@ variable "enable" {
variable "stack_name" { variable "stack_name" {
type = string type = string
description = "The name of the stack to deploy the service to." description = "The name of the stack to deploy the service to."
default = "cctv"
} }
variable "shm_size_mb" { variable "shm_size_mb" {
default = 256 default = 256

View file

@ -15,5 +15,5 @@ module "service" {
"mqtt_data" = "/mosquitto/data" "mqtt_data" = "/mosquitto/data"
"mqtt_logs" = "/mosquitto/logs" "mqtt_logs" = "/mosquitto/logs"
} }
converge_enable = false converge_enable = false # @todo Add healthcheck and enable this.
} }

View file

@ -19,6 +19,8 @@ module "service" {
mounts = local.mounts mounts = local.mounts
ports = var.ports ports = var.ports
placement_constraints = var.placement_constraints placement_constraints = var.placement_constraints
parallelism = 1
start_first = false
} }
locals { locals {
volumes = var.data_persist_path == null ? { volumes = var.data_persist_path == null ? {

View file

@ -18,10 +18,10 @@ module "anisette" {
} }
module "macless-haystack" { module "macless-haystack" {
source = "../../docker/service" source = "../../docker/service"
image = "christld/macless-haystack"
enable = var.enable enable = var.enable
stack_name = var.stack_name stack_name = var.stack_name
service_name = "macless-haystack" service_name = "macless-haystack"
image = "christld/macless-haystack"
networks = concat(var.networks, [module.network]) networks = concat(var.networks, [module.network])
converge_enable = false converge_enable = false
ports = [{ host = 6176, container = 6176, protocol = "tcp" }] ports = [{ host = 6176, container = 6176, protocol = "tcp" }]

View file

@ -6,4 +6,7 @@ output "postgres" {
} }
output "network" { output "network" {
value = module.network.network value = module.network.network
}
output "endpoint" {
value = module.pgbackweb.endpoint
} }

View file

@ -39,9 +39,9 @@ module "service" {
healthcheck = ["CMD", "redis-cli", "ping"] healthcheck = ["CMD", "redis-cli", "ping"]
healthcheck_interval = "10s" healthcheck_interval = "10s"
healthcheck_start_period = "10s" healthcheck_start_period = "10s"
volumes = { volumes = { "data" = "/data", }
"data" = "/data", ports = var.ports
} placement_constraints = var.placement_constraints
ports = var.ports parallelism = 1
placement_constraints = var.placement_constraints start_first = false
} }

View file

@ -1,4 +1,8 @@
module "traefik_network" { moved {
from = module.traefik_network
to = module.network
}
module "network" {
source = "../../docker/network" source = "../../docker/network"
stack_name = var.stack_name stack_name = var.stack_name
network_name = "traefik" network_name = "traefik"

View file

@ -2,7 +2,7 @@ output "docker_service" {
value = module.traefik.docker_service value = module.traefik.docker_service
} }
output "docker_network" { output "docker_network" {
value = module.traefik_network value = module.network
} }
output "endpoint" { output "endpoint" {
value = module.traefik.endpoint value = module.traefik.endpoint