Compare commits
No commits in common. "4c077e9475b5da6277facefa841e64af0d87f131" and "6caea1e2b73004cdfee974f2fa5dc9e7b4e47bdf" have entirely different histories.
4c077e9475
...
6caea1e2b7
5 changed files with 1 additions and 56 deletions
|
@ -7,6 +7,7 @@
|
||||||
log_level = "debug"
|
log_level = "debug"
|
||||||
inet = "0.0.0.0:8080"
|
inet = "0.0.0.0:8080"
|
||||||
workers = 4
|
workers = 4
|
||||||
|
|
||||||
manager_token = "${manager_token}"
|
manager_token = "${manager_token}"
|
||||||
reporter_token = "${reporter_token}"
|
reporter_token = "${reporter_token}"
|
||||||
|
|
||||||
|
|
1
nginx.tf
1
nginx.tf
|
@ -16,7 +16,6 @@ module "nginx" {
|
||||||
configs = concat(
|
configs = concat(
|
||||||
module.minio.nginx_files,
|
module.minio.nginx_files,
|
||||||
module.vigil_nginx_config.files,
|
module.vigil_nginx_config.files,
|
||||||
module.videobucket_nginx_config.files,
|
|
||||||
)
|
)
|
||||||
networks = [
|
networks = [
|
||||||
docker_network.loadbalancer,
|
docker_network.loadbalancer,
|
||||||
|
|
|
@ -12,13 +12,9 @@ resource "docker_volume" "ender5plus" {
|
||||||
provider = docker.printi
|
provider = docker.printi
|
||||||
name = "ender5plus_config"
|
name = "ender5plus_config"
|
||||||
}
|
}
|
||||||
resource "scratch_string" "arse" {
|
|
||||||
in = yamlencode(docker_image.octoprint)
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "docker_container" "ender5plus" {
|
resource "docker_container" "ender5plus" {
|
||||||
image = "${docker_image.octoprint.name}:latest"
|
image = "${docker_image.octoprint.name}:latest"
|
||||||
#image = docker_image.octoprint.image_id
|
|
||||||
provider = docker.printi
|
provider = docker.printi
|
||||||
name = "ender5plus"
|
name = "ender5plus"
|
||||||
env = [
|
env = [
|
||||||
|
|
|
@ -13,9 +13,5 @@ terraform {
|
||||||
source = "matthewbaggett/ssh"
|
source = "matthewbaggett/ssh"
|
||||||
version = "~> 0.1.0"
|
version = "~> 0.1.0"
|
||||||
}
|
}
|
||||||
scratch = {
|
|
||||||
source = "BrendanThompson/scratch"
|
|
||||||
version = "0.4.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
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 = <<EOF
|
|
||||||
S3_ENDPOINT=http://s3.california.ti
|
|
||||||
S3_BUCKET=video
|
|
||||||
S3_KEY=Ipi5Xh1b2UgcGiLSLLpQ
|
|
||||||
S3_SECRET=E4xMwB44MT4tGLStJnZTwQbuDNHL1KR9M4I8taBT
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
resource "docker_config" "video_bucket_config" {
|
|
||||||
name = "video_bucket_config_${substr(md5(local.video_bucket_config),0,7)}"
|
|
||||||
data = base64encode(local.video_bucket_config)
|
|
||||||
}
|
|
||||||
module "videobucket_nginx_config" {
|
|
||||||
# tflint-ignore: terraform_module_pinned_source
|
|
||||||
source = "git::https://code.techinc.nl/grey/terraform-nginx.git//nginx-site-available"
|
|
||||||
hostname = "video.california.ti"
|
|
||||||
//certificate = acme_certificate.ooo_grey["s3"]
|
|
||||||
service_name = docker_service.video_bucket.name
|
|
||||||
upstream_host = "${docker_service.video_bucket.name}:80"
|
|
||||||
config_prefix = "nginx"
|
|
||||||
allow_non_ssl = true
|
|
||||||
allow_ssl = false
|
|
||||||
}
|
|
Loading…
Reference in a new issue