Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change log driver of runpack to json-file #819

Merged
merged 1 commit into from
Sep 19, 2024
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
10 changes: 9 additions & 1 deletion app/models/heritage_task_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,16 @@ def run_pack_definition
cpu: 1,
memory: 16,
essential: false,
image: "public.ecr.aws/degica/barcelona-run-pack"
image: "public.ecr.aws/degica/barcelona-run-pack",
log_configuration: {
log_driver: "json-file",
options: {
"max-size": "10m",
"max-file": "10"
}
}
)

end

def reverse_proxy_definition_tcp
Expand Down
29 changes: 23 additions & 6 deletions spec/models/heritage_task_definition_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,24 @@
}
}
}

let(:expected_log_configuration_for_runpack) {
{
log_driver: "json-file",
options: {
"max-size": "10m",
"max-file": "10"
}
}
}
let(:expected_log_configuration_for_runpack2) {
{
"LogDriver" => "json-file",
"Options" => {
"max-size": "10m",
"max-file": "10"
}
}
}
describe ".service_definition" do
subject { described_class.service_definition(service).to_task_definition }
let(:district) { create :district }
Expand Down Expand Up @@ -52,7 +69,7 @@
essential: false,
image: "public.ecr.aws/degica/barcelona-run-pack",
environment: [],
log_configuration: expected_log_configuration
log_configuration: expected_log_configuration_for_runpack
}
]
})
Expand Down Expand Up @@ -105,7 +122,7 @@
essential: false,
image: "public.ecr.aws/degica/barcelona-run-pack",
environment: [],
log_configuration: expected_log_configuration
log_configuration: expected_log_configuration_for_runpack
},
{
name: "#{service.service_name}-revpro",
Expand Down Expand Up @@ -197,7 +214,7 @@
essential: false,
image: "public.ecr.aws/degica/barcelona-run-pack",
environment: [],
log_configuration: expected_log_configuration
log_configuration: expected_log_configuration_for_runpack
},
{
name: "#{service.service_name}-revpro",
Expand Down Expand Up @@ -283,7 +300,7 @@
essential: false,
image: "public.ecr.aws/degica/barcelona-run-pack",
environment: [],
log_configuration: expected_log_configuration
log_configuration: expected_log_configuration_for_runpack
}
]
})
Expand Down Expand Up @@ -352,7 +369,7 @@
"Essential" => false,
"Image" => "public.ecr.aws/degica/barcelona-run-pack",
"Environment" => [],
"LogConfiguration" => expected_log_configuration
"LogConfiguration" => expected_log_configuration_for_runpack2
}
]
})
Expand Down
Loading