my-homelab-configs/apps/gitea/docker_gitea_backup.tf

34 lines
652 B
HCL

# Pull down the Gitea image locally via the Pi's Docker engine
resource "docker_image" "gitea_backup" {
name = "gitea/gitea:1.21.7"
keep_locally = true
}
# Fire up the standalone container wrapper
resource "docker_container" "gitea_backup" {
name = "gitea-backup"
image = docker_image.gitea_backup.image_id
restart = "always"
env = [
"USER_UID=1000",
"USER_GID=1000",
"GITEA__database__DB_TYPE=sqlite3"
]
ports {
internal = 3000
external = 3000
}
ports {
internal = 22
external = 2222
}
volumes {
host_path = "/home/pi/gitea-backup-data"
container_path = "/data"
}
}