From 863287347d3171fc1e236fd6cec7e2431447df3a Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Sun, 28 Jul 2024 16:20:19 +0200 Subject: [PATCH] Add Orca Slicer --- orca-slicer.tf | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 orca-slicer.tf diff --git a/orca-slicer.tf b/orca-slicer.tf new file mode 100644 index 0000000..2ba7298 --- /dev/null +++ b/orca-slicer.tf @@ -0,0 +1,51 @@ +data "docker_registry_image" "orcaslicer" { + name = "ghcr.io/matthewbaggett/bucket-serve:latest" +} +resource "docker_volume" "orcaslicer" { + name = "orcaslicer_config" + +} +resource "docker_service" "orcaslicer" { + name = "orcaslicer" + task_spec { + container_spec { + image = "${data.docker_registry_image.orcaslicer.name}@${data.docker_registry_image.orcaslicer.sha256_digest}" + env = { + PUID = 1000 + PGID = 1000 + TZ = "Europe/Amsterdam" + } + mounts { + target = "/config" + type = "volume" + source = docker_volume.orcaslicer.name + } + } + networks_advanced { + name = docker_network.loadbalancer.id + } + restart_policy { + condition = "any" + delay = "0s" + window = "0s" + } + } + endpoint_spec { + ports { + target_port = 3000 + published_port = 3000 + publish_mode = "ingress" + } + } +} +module "orcaslicer_nginx_config" { + # tflint-ignore: terraform_module_pinned_source + source = "git::https://code.techinc.nl/grey/terraform-nginx.git//nginx-site-available" + hostname = "orca.california.ti" + //certificate = acme_certificate.ooo_grey["s3"] + service_name = docker_service.orcaslicer.name + upstream_host = "${docker_service.orcaslicer.name}:3000" + config_prefix = "nginx" + allow_non_ssl = true + allow_ssl = false +}