Initial commit
This commit is contained in:
51
gitea.tf
Normal file
51
gitea.tf
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user