summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org-buetow-ecs/audiobookshelfservice.tf12
-rw-r--r--org-buetow-ecs/bagservice.tf12
-rw-r--r--org-buetow-ecs/fluxpostgreservice.tf28
-rw-r--r--org-buetow-ecs/fluxservice.tf20
-rw-r--r--org-buetow-ecs/nginxservice.tf2
-rw-r--r--org-buetow-ecs/syncthingservice.tf12
-rw-r--r--org-buetow-ecs/vaultservice.tf12
7 files changed, 55 insertions, 43 deletions
diff --git a/org-buetow-ecs/audiobookshelfservice.tf b/org-buetow-ecs/audiobookshelfservice.tf
index 2e817fb..3ad5ca3 100644
--- a/org-buetow-ecs/audiobookshelfservice.tf
+++ b/org-buetow-ecs/audiobookshelfservice.tf
@@ -104,11 +104,13 @@ resource "aws_ecs_task_definition" "audiobookshelf" {
}
resource "aws_ecs_service" "audiobookshelf" {
- name = "audiobookshelf"
- cluster = aws_ecs_cluster.ecs_cluster.id
- task_definition = aws_ecs_task_definition.audiobookshelf.arn
- launch_type = "FARGATE"
- desired_count = 1
+ name = "audiobookshelf"
+ cluster = aws_ecs_cluster.ecs_cluster.id
+ task_definition = aws_ecs_task_definition.audiobookshelf.arn
+ launch_type = "FARGATE"
+ deployment_maximum_percent = 100
+ deployment_minimum_healthy_percent = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.audiobookshelf_tg.arn
diff --git a/org-buetow-ecs/bagservice.tf b/org-buetow-ecs/bagservice.tf
index d7a2dc9..bb5e2e4 100644
--- a/org-buetow-ecs/bagservice.tf
+++ b/org-buetow-ecs/bagservice.tf
@@ -83,11 +83,13 @@ resource "aws_ecs_task_definition" "bag" {
}
resource "aws_ecs_service" "bag" {
- name = "bag"
- cluster = aws_ecs_cluster.ecs_cluster.id
- task_definition = aws_ecs_task_definition.bag.arn
- launch_type = "FARGATE"
- desired_count = 1
+ name = "bag"
+ cluster = aws_ecs_cluster.ecs_cluster.id
+ task_definition = aws_ecs_task_definition.bag.arn
+ launch_type = "FARGATE"
+ deployment_maximum_percent = 100
+ deployment_minimum_healthy_percent = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.bag_tg.arn
diff --git a/org-buetow-ecs/fluxpostgreservice.tf b/org-buetow-ecs/fluxpostgreservice.tf
index adef771..888ed98 100644
--- a/org-buetow-ecs/fluxpostgreservice.tf
+++ b/org-buetow-ecs/fluxpostgreservice.tf
@@ -99,14 +99,14 @@ resource "aws_ecs_task_definition" "fluxpostgres" {
readOnly = false
}
],
- "logConfiguration" : {
- "logDriver" : "awslogs",
- "options" : {
- "awslogs-group" : "/ecs/containers",
- "awslogs-region" : "eu-central-1",
- "awslogs-stream-prefix" : "fluxpostgres"
- }
- }
+ #"logConfiguration" : {
+ # "logDriver" : "awslogs",
+ # "options" : {
+ # "awslogs-group" : "/ecs/containers",
+ # "awslogs-region" : "eu-central-1",
+ # "awslogs-stream-prefix" : "fluxpostgres"
+ # }
+ #}
}])
}
@@ -147,11 +147,13 @@ resource "aws_security_group" "fluxpostgres" {
}
}
resource "aws_ecs_service" "fluxpostgres" {
- name = "fluxpostgres"
- cluster = aws_ecs_cluster.ecs_cluster.id
- task_definition = aws_ecs_task_definition.fluxpostgres.arn
- launch_type = "FARGATE"
- desired_count = 1
+ name = "fluxpostgres"
+ cluster = aws_ecs_cluster.ecs_cluster.id
+ task_definition = aws_ecs_task_definition.fluxpostgres.arn
+ launch_type = "FARGATE"
+ deployment_maximum_percent = 100
+ deployment_minimum_healthy_percent = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.fluxpostgres_tcp.arn
diff --git a/org-buetow-ecs/fluxservice.tf b/org-buetow-ecs/fluxservice.tf
index b104c73..702f255 100644
--- a/org-buetow-ecs/fluxservice.tf
+++ b/org-buetow-ecs/fluxservice.tf
@@ -34,8 +34,8 @@ resource "aws_ecs_task_definition" "flux" {
name = "flux",
image = "miniflux/miniflux:latest",
portMappings = [{
- containerPort = 80,
- hostPort = 80
+ containerPort = 8080,
+ hostPort = 8080
}],
environment = [
{
@@ -71,16 +71,18 @@ resource "aws_ecs_task_definition" "flux" {
}
resource "aws_ecs_service" "flux" {
- name = "flux"
- cluster = aws_ecs_cluster.ecs_cluster.id
- task_definition = aws_ecs_task_definition.flux.arn
- launch_type = "FARGATE"
- desired_count = 1
+ name = "flux"
+ cluster = aws_ecs_cluster.ecs_cluster.id
+ task_definition = aws_ecs_task_definition.flux.arn
+ launch_type = "FARGATE"
+ deployment_maximum_percent = 100
+ deployment_minimum_healthy_percent = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.flux_tg.arn
container_name = "flux" # Must match the name in your container definition
- container_port = 80 # The port your container is listening on
+ container_port = 8080 # The port your container is listening on
}
network_configuration {
@@ -96,7 +98,7 @@ resource "aws_ecs_service" "flux" {
resource "aws_lb_target_group" "flux_tg" {
name = "flux-tg"
- port = 80
+ port = 8080
protocol = "HTTP"
vpc_id = data.terraform_remote_state.base.outputs.vpc_id
target_type = "ip"
diff --git a/org-buetow-ecs/nginxservice.tf b/org-buetow-ecs/nginxservice.tf
index 453ecb2..c092163 100644
--- a/org-buetow-ecs/nginxservice.tf
+++ b/org-buetow-ecs/nginxservice.tf
@@ -53,7 +53,7 @@ resource "aws_ecs_service" "nginx" {
cluster = aws_ecs_cluster.ecs_cluster.id
task_definition = aws_ecs_task_definition.nginx.arn
launch_type = "FARGATE"
- desired_count = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.nginx_tg.arn
diff --git a/org-buetow-ecs/syncthingservice.tf b/org-buetow-ecs/syncthingservice.tf
index 862bce8..d8a0574 100644
--- a/org-buetow-ecs/syncthingservice.tf
+++ b/org-buetow-ecs/syncthingservice.tf
@@ -245,11 +245,13 @@ resource "aws_security_group" "syncthing" {
}
}
resource "aws_ecs_service" "syncthing" {
- name = "syncthing"
- cluster = aws_ecs_cluster.ecs_cluster.id
- task_definition = aws_ecs_task_definition.syncthing.arn
- launch_type = "FARGATE"
- desired_count = 1
+ name = "syncthing"
+ cluster = aws_ecs_cluster.ecs_cluster.id
+ task_definition = aws_ecs_task_definition.syncthing.arn
+ launch_type = "FARGATE"
+ deployment_maximum_percent = 100
+ deployment_minimum_healthy_percent = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.syncthing_ui_tg.arn
diff --git a/org-buetow-ecs/vaultservice.tf b/org-buetow-ecs/vaultservice.tf
index f566d94..2d1fcb1 100644
--- a/org-buetow-ecs/vaultservice.tf
+++ b/org-buetow-ecs/vaultservice.tf
@@ -64,11 +64,13 @@ resource "aws_ecs_task_definition" "vault" {
}
resource "aws_ecs_service" "vault" {
- name = "vault"
- cluster = aws_ecs_cluster.ecs_cluster.id
- task_definition = aws_ecs_task_definition.vault.arn
- launch_type = "FARGATE"
- desired_count = 1
+ name = "vault"
+ cluster = aws_ecs_cluster.ecs_cluster.id
+ task_definition = aws_ecs_task_definition.vault.arn
+ launch_type = "FARGATE"
+ deployment_maximum_percent = 100
+ deployment_minimum_healthy_percent = 0
+ desired_count = 1
load_balancer {
target_group_arn = aws_lb_target_group.vault_tg.arn