From 009a46c85c8e71f4a325e29529c82945c50b6534 Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Wed, 3 Jul 2024 18:26:44 +0200 Subject: [PATCH] videobucket --- nginx.tf | 1 + video-bucket.tf | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 video-bucket.tf diff --git a/nginx.tf b/nginx.tf index 5c2291d..0bd6f67 100644 --- a/nginx.tf +++ b/nginx.tf @@ -16,6 +16,7 @@ module "nginx" { configs = concat( module.minio.nginx_files, module.vigil_nginx_config.files, + module.videobucket_nginx_config.files, ) networks = [ docker_network.loadbalancer, diff --git a/video-bucket.tf b/video-bucket.tf new file mode 100644 index 0000000..89cee0a --- /dev/null +++ b/video-bucket.tf @@ -0,0 +1,47 @@ +data "docker_registry_image" "video_bucket" { + name = "ghcr.io/matthewbaggett/bucket-serve:latest" +} +resource "docker_service" "video_bucket" { + name = "video-bucket" + task_spec { + container_spec { + image = "${data.docker_registry_image.video_bucket.name}@${data.docker_registry_image.video_bucket.sha256_digest}" + configs { + config_id = docker_config.video_bucket_config.id + config_name = docker_config.video_bucket_config.name + file_name = "/app/.env" + } + } + networks_advanced { + name = docker_network.loadbalancer.id + } + restart_policy { + condition = "any" + delay = "0s" + window = "0s" + } + } +} +locals{ + video_bucket_config = <