From d3acd365cc03d25bcd6c902d7de003ef21b8a430 Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Thu, 18 Jul 2024 17:17:38 +0200 Subject: [PATCH] Added mitmproxy. Disabled mitmproxy. --- mitmproxy.tf_ | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 mitmproxy.tf_ diff --git a/mitmproxy.tf_ b/mitmproxy.tf_ new file mode 100644 index 0000000..e2896fe --- /dev/null +++ b/mitmproxy.tf_ @@ -0,0 +1,44 @@ +data "docker_registry_image" "mitmproxy" { + name = "ghcr.io/benzine-framework/mitmproxy:10.1.1" +} +resource "docker_service" "mitmproxy" { + name = "mitmproxy" + task_spec { + container_spec { + image = "${data.docker_registry_image.mitmproxy.name}@${data.docker_registry_image.mitmproxy.sha256_digest}" + command = [ + "mitmweb", + "--web-host", "0.0.0.0", + "--web-port", "8081", + #"--listen-host", "0.0.0.0", + #"--listen-port", "8080", + "--ssl-insecure", + ] + #healthcheck { + # test = ["CMD-SHELL", " curl -I -x http://localhost:8080 -k http://172.17.0.1 || exit 1"] + # start_period = "10s" + # interval = "10s" + # timeout = "5s" + # retries = 5 + #} + } + restart_policy { + condition = "any" + delay = "0s" + window = "0s" + } + } + endpoint_spec { + ports { + target_port = 8081 + published_port = 8081 + publish_mode = "ingress" + } + ports { + target_port = 8080 + published_port = 8080 + publish_mode = "ingress" + } + } +} +