From fdbbe7f539a7f5d7467ab533d44815e625669dff Mon Sep 17 00:00:00 2001 From: Tobias McNulty Date: Sat, 26 Oct 2024 09:46:36 -0400 Subject: [PATCH] Remove production Docker entrypoint --- Dockerfile | 4 ++-- docker-compose.yml | 2 +- docker-entrypoint.prod.sh | 8 -------- 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100755 docker-entrypoint.prod.sh diff --git a/Dockerfile b/Dockerfile index b1d4ca82b..19a42f83e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,5 +48,5 @@ RUN npm install # copy project COPY . . -# run docker-entrypoint.sh -ENTRYPOINT ["./docker-entrypoint.prod.sh"] +# ENTRYPOINT is specified only in the local docker-compose.yml to avoid +# accidentally running it in deployed environments. diff --git a/docker-compose.yml b/docker-compose.yml index f0143f9b4..6e1b74fd3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: dockerfile: Dockerfile args: - REQ_FILE=requirements/tests.txt - entrypoint: docker-entrypoint.dev.sh + entrypoint: ./docker-entrypoint.dev.sh command: python manage.py runserver 0.0.0.0:8000 volumes: - .:/usr/src/app/ diff --git a/docker-entrypoint.prod.sh b/docker-entrypoint.prod.sh deleted file mode 100755 index a78cb5641..000000000 --- a/docker-entrypoint.prod.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -python -m manage migrate -python -m manage compilemessages -make compile-scss # must come before collectstatic -python -m manage collectstatic --no-input --clear - -exec "$@"