Compare commits
2 Commits
0.1.0-alph
...
0.1.0-alph
Author | SHA1 | Date | |
---|---|---|---|
f907ef83cf | |||
39031e23df |
11
Dockerfile
11
Dockerfile
@ -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"]
|
||||
|
5
Makefile
5
Makefile
@ -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)
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user