Skip to content

Commit d1fa546

Browse files
committed
attempt 3
1 parent 49fe324 commit d1fa546

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

backend/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ COPY --chown=app:app --from=build-stage ${FUNCTION_DIR}/.venv ${FUNCTION_DIR}/.v
8181

8282
COPY --chown=app:app . ${FUNCTION_DIR}
8383

84-
USER app
85-
8684
RUN mkdir -p assets && .venv/bin/python manage.py collectstatic --noinput
8785

88-
ENTRYPOINT ["/home/app/.venv/bin/gunicorn"]
89-
CMD [ "pycon.wsgi" ]
86+
ENTRYPOINT ["/entrypoint.sh"]

backend/entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source /home/app/.venv/bin/activate
2+
3+
echo "Fixing permissions"
4+
chown -R app:app /tmp
5+
6+
exec su-exec app "$@"

infrastructure/applications/pycon_backend/worker_heavy_processing.tf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ resource "aws_ecs_task_definition" "heavy_processing_worker" {
2323
memoryReservation = 16384
2424
essential = true
2525
entrypoint = [
26-
"/home/app/.venv/bin/celery",
26+
"/entrypoint.sh"
2727
]
2828

2929
command = [
30-
"-A", "pycon", "worker", "-l", "info", "-Q", "heavy_processing", "--hostname", "heavyprocessing@%h", "-E"
30+
"/home/app/.venv/bin/celery", "-A", "pycon", "worker", "-l", "info", "-Q", "heavy_processing", "--hostname", "heavyprocessing@%h", "-E"
3131
]
3232

3333
environment = local.env_vars
@@ -73,11 +73,6 @@ resource "aws_ecs_task_definition" "heavy_processing_worker" {
7373
volume {
7474
name = "storage"
7575
configure_at_launch = true
76-
docker_volume_configuration {
77-
driver_opts = {
78-
o = "uid=999,gid=999"
79-
}
80-
}
8176
}
8277

8378
tags = {}

0 commit comments

Comments
 (0)