Initial commit

This commit is contained in:
Marc Fokkert
2023-07-26 21:01:51 +02:00
commit e357babf6d
52 changed files with 1681 additions and 0 deletions

51
gitea.tf Normal file
View File

@@ -0,0 +1,51 @@
resource "docker_image" "gitea" {
name = "gitea/gitea:latest-rootless"
}
resource "docker_container" "gitea" {
image = docker_image.gitea.latest
name = "gitea"
restart = "always"
# user = "1000:1000"
env = [
"GITEA__database__DB_TYPE=mysql",
"GITEA__database__HOST=192.168.2.127:3306",
"GITEA__database__NAME=gitea",
"GITEA__database__USER=gitea",
"GITEA__database__PASSWD=3uM4kBGaNQDo3tsRa9Nh",
# "USER_UID=1000",
# "USER_GID=1000"
]
mounts {
target = "/var/lib/gitea"
source = "/share/appdata/gitea/data"
type = "bind"
}
mounts {
target = "/etc/gitea"
source = "/share/appdata/gitea/config"
type = "bind"
}
mounts {
target = "/etc/localtime"
source = "/etc/localtime"
type = "bind"
read_only = true
}
lifecycle {
ignore_changes = [
ulimit,
log_opts
]
}
networks_advanced {
name = docker_network.bridge.name
ipv4_address = "192.168.2.131"
}
}