Compare commits

..

4 commits

Author SHA1 Message Date
37407f72c2
Updated lib
Some checks are pending
Trunk Check / Trunk Check Runner (push) Waiting to run
2025-01-17 12:36:45 +01:00
0a9425f300
Disable headscale 2025-01-17 12:17:39 +01:00
7b22ea4ab2
rework to use socket-proxy 2025-01-17 11:52:20 +01:00
74a30b3194
rework to use socket-proxy 2025-01-17 11:51:01 +01:00
5 changed files with 46 additions and 26 deletions

@ -1 +1 @@
Subproject commit 0c1b34c382eda5726554b64ee1bd50a92dc2c564
Subproject commit 5ceb5aa6820075bb78ab22477bf85b2ffa23010b

View file

@ -1,32 +1,17 @@
module "s1" {
//source = "github.com/matthewbaggett/terraform_modules//docker/service"
source = "./lib/grey.ooo/docker/service"
stack_name = "printers"
service_name = "s1proxy"
image = "alpine/socat:latest"
command = ["socat", "tcp-listen:80,fork,reuseaddr", "tcp-connect:s1.prin.ti:80"]
traefik = merge(var.treafik_defaults, {
domain = "s1.${var.base_domain}"
port = 80
basic-auth-users = ["techinc"]
})
converge_enable = false
source = "./lib/grey.ooo/products/socket-proxy"
stack_name = "printers"
service_name = "s1proxy"
target = { host = "s1.prin.ti", port = 80 }
traefik = { domain = "s1.${var.base_domain}", basic-auth-users = ["techinc"] }
placement_constraints = ["node.hostname == california"]
}
module "label_printer" {
//source = "github.com/matthewbaggett/terraform_modules//docker/service"
source = "./lib/grey.ooo/docker/service"
stack_name = "printers"
service_name = "labelprinter"
image = "alpine/socat:latest"
command = ["socat", "tcp-listen:80,fork,reuseaddr", "tcp-connect:labelprinter.ti:80"]
traefik = merge(var.treafik_defaults, {
domain = "labelprinter.${var.base_domain}"
port = 80
basic-auth-users = ["techinc"]
})
converge_enable = false
source = "./lib/grey.ooo/products/socket-proxy"
stack_name = "printers"
service_name = "labelprinter"
target = { host = "labelprinter.ti", port = 80 }
traefik = { domain = "labelprinter.${var.base_domain}", basic-auth-users = ["techinc"] }
placement_constraints = ["node.hostname == california"]
}

View file

@ -0,0 +1,17 @@
module "unifi_proxy" {
source = "./lib/grey.ooo/products/socket-proxy"
stack_name = "proxy"
service_name = "unifi"
target = { host = "unifi.ti", port = 8080 }
traefik = {
domain = "unifi.${var.base_domain}",
basic-auth-users = ["techinc"],
headers = { Host = "unifi.ti" }
}
placement_constraints = ["node.hostname == california"]
}
output "unifi_proxy" {
value = {
endpoint = module.unifi_proxy.endpoint
}
}

18
service.test.tf Normal file
View file

@ -0,0 +1,18 @@
module "test" {
source = "./lib/grey.ooo/docker/service"
stack_name = "test"
service_name = "hello"
image = "nginxdemos/hello:plain-text"
parallelism = 5
traefik = {
domain = "test.${var.base_domain}"
port = 80
ssl = true
non-ssl = true
#basic-auth-users = ["test"]
}
}
output "test" {
value = module.test.endpoint
}