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 = <