Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fileproxy/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
</div>
</nav>

<!-- Dev banner -->
<div class="text-center py-2 small" style="background:var(--bs-warning-bg-subtle);border-bottom:1px solid var(--bs-warning-border-subtle);color:var(--bs-warning-text-emphasis);">
Under active development &mdash; <a href="https://github.com/JaminB/FileProxy" class="fw-semibold" target="_blank" rel="noopener">view on GitHub</a>
</div>

<!-- Main content -->
<main class="container py-4">
{% if messages %}
Expand Down
24 changes: 12 additions & 12 deletions terraform/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ resource "aws_ecs_task_definition" "api" {
family = "${var.project}-${var.env}-api"
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = "1024"
memory = "2048"
cpu = "256"
memory = "512"
execution_role_arn = aws_iam_role.ecs_execution.arn
task_role_arn = aws_iam_role.ecs_task.arn

Expand Down Expand Up @@ -123,7 +123,7 @@ resource "aws_ecs_task_definition" "api" {

environment = concat(local.common_env, [
{ name = "DJANGO_MODE", value = "api" },
{ name = "GUNICORN_WORKERS", value = "4" },
{ name = "GUNICORN_WORKERS", value = "1" },
{ name = "GUNICORN_TIMEOUT", value = tostring(local.api_timeout_s) },
])

Expand All @@ -141,8 +141,8 @@ resource "aws_ecs_task_definition" "ui" {
family = "${var.project}-${var.env}-ui"
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = "512"
memory = "1024"
cpu = "256"
memory = "512"
execution_role_arn = aws_iam_role.ecs_execution.arn
task_role_arn = aws_iam_role.ecs_task.arn

Expand All @@ -155,7 +155,7 @@ resource "aws_ecs_task_definition" "ui" {

environment = concat(local.common_env, [
{ name = "DJANGO_MODE", value = "ui" },
{ name = "GUNICORN_WORKERS", value = "2" },
{ name = "GUNICORN_WORKERS", value = "1" },
{ name = "GUNICORN_TIMEOUT", value = "60" },
])

Expand All @@ -171,8 +171,8 @@ resource "aws_ecs_task_definition" "worker" {
family = "${var.project}-${var.env}-worker"
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = "1024"
memory = "2048"
cpu = "256"
memory = "512"
execution_role_arn = aws_iam_role.ecs_execution.arn
task_role_arn = aws_iam_role.ecs_task.arn

Expand All @@ -198,7 +198,7 @@ resource "aws_ecs_task_definition" "worker" {

environment = concat(local.common_env, [
{ name = "DJANGO_MODE", value = "worker" },
{ name = "CELERY_WORKERS", value = "4" },
{ name = "CELERY_WORKERS", value = "1" },
])

secrets = local.common_secrets
Expand Down Expand Up @@ -395,9 +395,9 @@ resource "aws_ecs_service" "beat" {

locals {
autoscaling = {
api = { service = aws_ecs_service.api.name, max = 10, min = 1, target_cpu = 60.0, scale_in = 120 }
ui = { service = aws_ecs_service.ui.name, max = 3, min = 1, target_cpu = 70.0, scale_in = 180 }
worker = { service = aws_ecs_service.worker.name, max = 5, min = 1, target_cpu = 60.0, scale_in = 120 }
api = { service = aws_ecs_service.api.name, max = 1, min = 1, target_cpu = 60.0, scale_in = 120 }
ui = { service = aws_ecs_service.ui.name, max = 1, min = 1, target_cpu = 70.0, scale_in = 180 }
worker = { service = aws_ecs_service.worker.name, max = 1, min = 1, target_cpu = 60.0, scale_in = 120 }
}
}

Expand Down
Loading