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
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app

# Run as non-root user for security
RUN useradd -m appuser
USER appuser

# Run poetry install --without dev
RUN poetry install --only main --no-root

Expand Down
6 changes: 2 additions & 4 deletions terraform/dashboard/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ resource "aws_ecs_task_definition" "ecs_service_definition" {
appProtocol = "http"
}
],
readonlyRootFilesystem = true,
environment = [
{
name = "AWS_ACCESS_KEY_ID"
Expand Down Expand Up @@ -117,10 +118,7 @@ resource "aws_ecs_service" "application" {
network_configuration {
subnets = data.terraform_remote_state.ecs_infrastructure.outputs.private_subnets
security_groups = [aws_security_group.allow_rules_service.id]

# TODO: The container fails to launch unless a public IP is assigned
# For a private ip, you would need to use a NAT Gateway?
assign_public_ip = true
assign_public_ip = false
}

}
Loading