Add EFS mount point.
This commit is contained in:
parent
c930e89148
commit
39031e23df
10
Dockerfile
10
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"]
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user