51 lines
837 B
HCL
51 lines
837 B
HCL
terraform {
|
|
required_providers {
|
|
podman = {
|
|
source = "project0/podman"
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "podman_container" "syslog_ng" {
|
|
name = "syslog-ng"
|
|
image = "lscr.io/linuxserver/syslog-ng:latest"
|
|
restart = "unless-stopped"
|
|
|
|
# Environment variables
|
|
env = {
|
|
PUID = "1000"
|
|
PGID = "1000"
|
|
TZ = "Etc/UTC"
|
|
}
|
|
|
|
# Port mappings
|
|
ports {
|
|
host_port = 514
|
|
container_port = 5514
|
|
protocol = "udp"
|
|
}
|
|
|
|
ports {
|
|
host_port = 601
|
|
container_port = 6601
|
|
protocol = "tcp"
|
|
}
|
|
|
|
ports {
|
|
host_port = 6514
|
|
container_port = 6514
|
|
protocol = "tcp"
|
|
}
|
|
|
|
# Volume mounts
|
|
volumes {
|
|
host_path = "/srv/syslog/config"
|
|
container_path = "/config"
|
|
}
|
|
|
|
volumes {
|
|
host_path = "/srv/syslog/log"
|
|
container_path = "/var/log"
|
|
}
|
|
}
|