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

55
nginx-lb.tf Normal file
View File

@@ -0,0 +1,55 @@
data "docker_registry_image" "nginx-lb" {
name = "nginx:alpine"
}
resource "docker_image" "nginx-lb" {
name = data.docker_registry_image.nginx-lb.name
pull_triggers = [data.docker_registry_image.nginx-lb.sha256_digest]
}
resource "docker_network" "nginx-lb" {
name = "nginx-lb"
}
resource "docker_container" "nginx-lb" {
image = docker_image.nginx-lb.latest
name = "nginx-lb"
mounts {
target = "/etc/nginx/nginx.conf"
source = "/share/appdata/nginx-lb/nginx.conf"
type = "bind"
}
mounts {
target = "/etc/nginx/config"
source = "/share/appdata/nginx-lb/conf"
type = "bind"
}
mounts {
target = "/etc/nginx/certs"
source = "/share/appdata/nginx-lb/certs"
type = "bind"
}
mounts {
target = "/var/www/acme-challenge-root"
source = "/share/appdata/nginx-lb/certbot"
type = "bind"
}
restart = "always"
networks_advanced {
name = docker_network.bridge.name
ipv4_address = "192.168.2.115"
}
lifecycle {
ignore_changes = [
ulimit,
log_opts
]
}
}