2 Commits

Author SHA1 Message Date
f907ef83cf Add needed PCRE dependency. 2023-03-10 23:44:38 -06:00
39031e23df Add EFS mount point. 2023-03-10 23:31:47 -06:00
3 changed files with 14 additions and 11 deletions

View File

@ -8,13 +8,8 @@ RUN nimble build -y
FROM alpine
EXPOSE 80
RUN apk -v --update add --no-cache pcre
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"]

View File

@ -22,10 +22,11 @@ build-image: $(SOURCES)
push-image: build-image
docker push $(ECR_ACCOUNT_URL)/toclerbe:$(VERSION)
serve-docker: build-image start-postgres
serve-docker: build-image
docker run \
-v "data:/data" \
-e TOCLERBE_PORT=80 \
-e TOCLERBE_API_KEYS=qwertyasdfgh
-e TOCLERBE_API_KEYS=qwertyasdfgh \
-e "ISSUER=$(ISSUER)" \
-p 127.0.0.1:$(PORT):80/tcp \
$(ECR_ACCOUNT_URL)/toclerbe:$(VERSION)

View File

@ -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"
}
]