Skip to content

Commit

Permalink
Merge pull request #6 from IrezD/feature
Browse files Browse the repository at this point in the history
Fix: Reducing memory and cpu size
  • Loading branch information
IrezD authored Dec 29, 2023
2 parents 8c640c1 + 1b9d64e commit 7d647f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Item(BaseModel):

@app.get("/")
def read_root():
return {"Hello World!": "Merry Christmas and a happy new year to everyone!!!"}
return {"Message": "Hello world! Merry Christmas and a happy new year to everyone!!!"}


@app.get("/items/{item_id}")
Expand Down
8 changes: 4 additions & 4 deletions terraform/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ resource "aws_ecs_task_definition" "task_definition" {
family = "${var.env}-fastapi-container"
requires_compatibilities = ["FARGATE"]
network_mode = "awsvpc"
cpu = 1024
memory = 2048
cpu = 256
memory = 512
container_definitions = <<TASK_DEFINITION
[
{
"name": "${var.env}_FastAPI_image",
"image": "${aws_ecrpublic_repository.fastapi-ecr-public.repository_uri}:${var.image_tag}",
"cpu": 1024,
"memory": 2048,
"cpu": 256,
"memory": 512,
"essential": true,
"portMappings": [
{
Expand Down

0 comments on commit 7d647f9

Please sign in to comment.