diff --git a/Dockerfile b/Dockerfile index 770408f..872c9a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,6 @@ RUN nimble build -y FROM alpine EXPOSE 80 -RUN apk add --no-cache \ - python3 \ - py3-pip \ - && pip3 install --upgrade pip \ - && pip3 install --no-cache-dir awscli \ - && rm -rf /var/cache/apk/* - +RUN mkdir -p /data COPY --from=build /toclerbe/toclerbe / -CMD ["/toclerbe", "/toclerbe/data/urls.txt"] +CMD ["/toclerbe", "/data/urls.txt"] diff --git a/operations/terraform/ecs.tf b/operations/terraform/ecs.tf index f73ec37..fd54fbb 100644 --- a/operations/terraform/ecs.tf +++ b/operations/terraform/ecs.tf @@ -2,6 +2,13 @@ resource "aws_secretsmanager_secret" "toclerbe" { name = "${var.app_name}-config" } +resource "aws_efs_mount_target" "ortis" { + file_system_id = data.terraform_remote_state.jdbsoft.outputs.sobeck-efs.id + subnet_id = data.terraform_remote_state.jdbsoft.outputs.aws_subnet_private2.id + security_groups = [ data.terraform_remote_state.jdbsoft.outputs.aws_security_group_private_traffic.id ] +} + + resource "aws_ecs_task_definition" "toclerbe" { family = var.app_name network_mode = "bridge" @@ -24,7 +31,7 @@ resource "aws_ecs_task_definition" "toclerbe" { ] mountPoints = [ { - containerPath = "/toclerbe/data" + containerPath = "/data" sourceVolume = "efs-toclerbe-data" } ]