Opinionated.tf/products/quassel/quassel.tf

39 lines
1.3 KiB
Terraform
Raw Permalink Normal View History

2024-07-29 19:28:08 +00:00
module "network" {
2024-11-22 10:56:12 +00:00
source = "../../docker/network"
2024-07-29 19:28:08 +00:00
stack_name = var.stack_name
}
module "postgres" {
2024-11-22 10:56:12 +00:00
source = "../postgres"
2025-01-29 17:55:28 +00:00
enable = var.enable
2024-07-29 19:28:08 +00:00
postgres_version = "16"
stack_name = var.stack_name
2024-11-27 00:12:10 +00:00
networks = [module.network]
2024-07-29 19:28:08 +00:00
username = "postgres"
database = "postgres"
placement_constraints = var.placement_constraints
2025-01-29 17:55:28 +00:00
ports = [{ container = 5432 }]
2024-07-29 19:28:08 +00:00
}
module "service" {
2024-11-22 10:56:12 +00:00
source = "../../docker/service"
2025-01-29 17:55:28 +00:00
enable = var.enable
2024-07-29 19:28:08 +00:00
image = "${var.quassel_image}:${var.quassel_version}"
stack_name = var.stack_name
service_name = "quassel"
2024-11-26 13:42:54 +00:00
networks = [module.network]
2024-07-29 19:28:08 +00:00
environment_variables = {
PUID = 1000
PGID = 1000
TZ = "Europe/Amsterdam"
RUN_OPTS = "--config-from-environment"
DB_BACKEND = "PostgreSQL"
DB_PGSQL_USERNAME = module.postgres.username
DB_PGSQL_PASSWORD = module.postgres.password
DB_PGSQL_HOSTNAME = module.postgres.service_name
DB_PGSQL_PORT = 5432
AUTH_AUTHENTICATOR = "Database"
}
placement_constraints = var.placement_constraints
2025-01-29 17:55:28 +00:00
ports = var.ports
converge_enable = false # @todo MB: add healthcheck and fix this.
2024-07-29 19:28:08 +00:00
}