Add actualbudget, sort imports
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
ACTUAL_OPENID_DISCOVERY_URL=https://authz.blackchaosnl.myaddr.dev/application/o/actual/
|
||||
ACTUAL_OPENID_CLIENT_ID=
|
||||
ACTUAL_OPENID_CLIENT_SECRET=
|
||||
ACTUAL_OPENID_SERVER_HOSTNAME=https://authz.blackchaosnl.myaddr.dev
|
||||
ACTUAL_ALLOWED_LOGIN_METHODS="['password','openid']"
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
locals {
|
||||
container_name = "actualbudget"
|
||||
image = "ghcr.io/actualbudget/actual"
|
||||
image_tag = var.image_tag
|
||||
env_file = "${path.module}/.env"
|
||||
internal_port = 5006
|
||||
|
||||
default_volumes = [
|
||||
{
|
||||
host_path = "${var.volume_path}/data"
|
||||
container_path = "/data"
|
||||
read_only = false
|
||||
}
|
||||
]
|
||||
|
||||
actualbudget_env_vars = {
|
||||
ACTUAL_OPENID_DISCOVERY_URL = provider::dotenv::get_by_key("ACTUAL_OPENID_DISCOVERY_URL", local.env_file)
|
||||
ACTUAL_OPENID_CLIENT_ID = provider::dotenv::get_by_key("ACTUAL_OPENID_CLIENT_ID", local.env_file)
|
||||
ACTUAL_OPENID_CLIENT_SECRET = provider::dotenv::get_by_key("ACTUAL_OPENID_CLIENT_SECRET", local.env_file)
|
||||
ACTUAL_OPENID_SERVER_HOSTNAME = provider::dotenv::get_by_key("ACTUAL_OPENID_SERVER_HOSTNAME", local.env_file)
|
||||
ACTUAL_ALLOWED_LOGIN_METHODS = provider::dotenv::get_by_key("ACTUAL_ALLOWED_LOGIN_METHODS", local.env_file)
|
||||
}
|
||||
}
|
||||
|
||||
module "actualbudget" {
|
||||
source = "../../10-generic/docker-service"
|
||||
container_name = local.container_name
|
||||
image = local.image
|
||||
tag = local.image_tag
|
||||
volumes = local.default_volumes
|
||||
env_vars = local.actualbudget_env_vars
|
||||
networks = var.networks
|
||||
restart_policy = "always"
|
||||
}
|
||||
|
||||
output "service_definition" {
|
||||
description = "General service definition with optional ingress configuration"
|
||||
value = {
|
||||
name = local.container_name
|
||||
primary_port = local.internal_port
|
||||
endpoint = "http://${local.container_name}:${local.internal_port}"
|
||||
subdomains = ["budget"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
variable "image_tag" {
|
||||
description = "Tag of the ActualBudget image to use. Default: latest-alpine"
|
||||
type = string
|
||||
default = "latest-alpine"
|
||||
}
|
||||
|
||||
variable "volume_path" {
|
||||
description = "Host path for ActualBudget data volume"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "networks" {
|
||||
description = "List of networks to which the container should be attached"
|
||||
type = list(string)
|
||||
}
|
||||
+16
-9
@@ -19,6 +19,18 @@ module "infrastructure_int" {
|
||||
}
|
||||
}
|
||||
|
||||
module "jellyfin" {
|
||||
source = "${local.module_dir}/20-services-entertainment/jellyfin-service"
|
||||
volume_path = "${local.root_volume}/jellyfin"
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "calibre" {
|
||||
source = "${local.module_dir}/20-services-entertainment/calibre-service"
|
||||
volume_path = "${local.root_volume}/calibre"
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "authentik" {
|
||||
source = "${local.module_dir}/30-services-software/authentik-service"
|
||||
volume_path = "${local.root_volume}/authentik"
|
||||
@@ -37,12 +49,6 @@ module "tandoor" {
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "jellyfin" {
|
||||
source = "${local.module_dir}/20-services-entertainment/jellyfin-service"
|
||||
volume_path = "${local.root_volume}/jellyfin"
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "qbittorrent" {
|
||||
source = "${local.module_dir}/30-services-software/qbittorrent-service"
|
||||
volume_path = "${local.root_volume}/qbittorrent"
|
||||
@@ -55,8 +61,9 @@ module "coder" {
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "calibre" {
|
||||
source = "${local.module_dir}/20-services-entertainment/calibre-service"
|
||||
volume_path = "${local.root_volume}/calibre"
|
||||
module "actualbudget" {
|
||||
source = "${local.module_dir}/30-services-software/actualbudget-service"
|
||||
volume_path = "${local.root_volume}/actualbudget"
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -3,11 +3,12 @@ output "service_definitions" {
|
||||
value = [
|
||||
module.jellyfin.service_definition,
|
||||
module.calibre.service_definition,
|
||||
module.authentik.service_definition,
|
||||
module.traccar.service_definition,
|
||||
module.tandoor.service_definition,
|
||||
module.qbittorrent.service_definition,
|
||||
module.coder.service_definition,
|
||||
module.authentik.service_definition,
|
||||
module.actualbudget.service_definition,
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user