feature: Add satisfactory to homelab
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
MAXPLAYERS=16
|
||||
PGID=1000
|
||||
PUID=1000
|
||||
STEAMBETA=false
|
||||
@@ -0,0 +1,49 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
dotenv = {
|
||||
source = "germanbrew/dotenv"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
container_name = "satisfactory"
|
||||
satisfactory_image = "ghcr.io/wolveix/satisfactory-server"
|
||||
satisfactory_tag = var.image_tag
|
||||
env_file = "${path.module}/.env"
|
||||
satisfactory_internal_port = 7777
|
||||
}
|
||||
|
||||
|
||||
|
||||
module "satisfactory" {
|
||||
source = "../../10-generic/docker-service"
|
||||
container_name = local.container_name
|
||||
image = local.satisfactory_image
|
||||
tag = local.satisfactory_tag
|
||||
networks = var.networks
|
||||
restart_policy = "always"
|
||||
memory_limit = 16000 // 16Gb
|
||||
volumes = [
|
||||
{
|
||||
host_path = "${var.volume_path}/${local.container_name}/config"
|
||||
container_path = "/config"
|
||||
read_only = true
|
||||
},
|
||||
]
|
||||
env_vars = {
|
||||
MAXPLAYERS = provider::dotenv::get_by_key("MAXPLAYERS", local.env_file)
|
||||
PUID = var.user_id
|
||||
PGID = var.group_id
|
||||
}
|
||||
}
|
||||
|
||||
output "service_definition" {
|
||||
description = "General service definition with optional ingress configuration"
|
||||
value = {
|
||||
name = local.container_name
|
||||
primary_port = local.satisfactory_internal_port
|
||||
endpoint = "http://${local.container_name}:${local.satisfactory_internal_port}"
|
||||
subdomains = ["satisfactory"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
variable "image_tag" {
|
||||
description = "The tag for the Satisfactory container image. Default: latest"
|
||||
type = string
|
||||
default = "latest"
|
||||
}
|
||||
|
||||
variable "volume_path" {
|
||||
description = "Base directory for volumes"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "networks" {
|
||||
description = "List of networks to which the container should be attached"
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "user_id" {
|
||||
description = "User ID for container permissions"
|
||||
type = string
|
||||
default = "1000"
|
||||
}
|
||||
|
||||
variable "group_id" {
|
||||
description = "Group ID for container permissions"
|
||||
type = string
|
||||
default = "1000"
|
||||
}
|
||||
|
||||
variable "timezone" {
|
||||
description = "Timezone for the container"
|
||||
type = string
|
||||
default = "Europe/Helsinki"
|
||||
}
|
||||
+8
-1
@@ -25,6 +25,12 @@ module "jellyfin" {
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "satisfactory" {
|
||||
source = "${local.module_dir}/20-services-entertainment/satisfactory-service"
|
||||
volume_path = "${local.root_volume}/satisfactory"
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
|
||||
module "authentik" {
|
||||
source = "${local.module_dir}/30-services-software/authentik-service"
|
||||
volume_path = "${local.root_volume}/authentik"
|
||||
@@ -59,4 +65,5 @@ module "fs-quantum" {
|
||||
source = "${local.module_dir}/30-services-software/filesystem-service"
|
||||
volume_path = "${local.root_volume}/fs-quantum"
|
||||
networks = [module.infrastructure_int.name]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ output "service_definitions" {
|
||||
description = "Service definitions for all services"
|
||||
value = [
|
||||
module.jellyfin.service_definition,
|
||||
module.satisfactory.service_definition,
|
||||
module.authentik.service_definition,
|
||||
module.traccar.service_definition,
|
||||
module.tandoor.service_definition,
|
||||
|
||||
Reference in New Issue
Block a user