Work on nginx loadbalancer and photoprism
This commit is contained in:
15
nginx-lb.tf
15
nginx-lb.tf
@@ -1,5 +1,5 @@
|
||||
data "docker_registry_image" "nginx-lb" {
|
||||
name = "nginx:alpine"
|
||||
name = "jonasal/nginx-certbot:latest"
|
||||
}
|
||||
|
||||
resource "docker_image" "nginx-lb" {
|
||||
@@ -15,6 +15,10 @@ resource "docker_container" "nginx-lb" {
|
||||
image = docker_image.nginx-lb.image_id
|
||||
name = "nginx-lb"
|
||||
|
||||
env = [
|
||||
"CERTBOT_EMAIL=letsencrypt@xz1.nl"
|
||||
]
|
||||
|
||||
mounts {
|
||||
target = "/etc/nginx/nginx.conf"
|
||||
source = "/share/appdata/nginx-lb/nginx.conf"
|
||||
@@ -28,14 +32,15 @@ resource "docker_container" "nginx-lb" {
|
||||
}
|
||||
|
||||
mounts {
|
||||
target = "/etc/nginx/certs"
|
||||
source = "/share/appdata/nginx-lb/certs"
|
||||
target = "/etc/nginx/user_conf.d"
|
||||
source = "/share/appdata/nginx-lb/user_conf.d"
|
||||
type = "bind"
|
||||
}
|
||||
|
||||
|
||||
mounts {
|
||||
target = "/var/www/acme-challenge-root"
|
||||
source = "/share/appdata/nginx-lb/certbot"
|
||||
target = "/etc/letsencrypt"
|
||||
source = "/share/appdata/nginx-lb/secrets"
|
||||
type = "bind"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user