From d8d172ec59f52ad8b370b5ee6a12ff3e069f3571 Mon Sep 17 00:00:00 2001 From: "pierre-francois.duc" Date: Tue, 28 Jan 2025 21:28:20 +0100 Subject: [PATCH] Copy startup file --- app/compose/production/app_postgres/Dockerfile | 7 +++++++ app/compose/production/app_postgres/start | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/compose/production/app_postgres/Dockerfile b/app/compose/production/app_postgres/Dockerfile index ffea55a2..b55dad0d 100644 --- a/app/compose/production/app_postgres/Dockerfile +++ b/app/compose/production/app_postgres/Dockerfile @@ -21,8 +21,15 @@ ADD app/ ${APP_ROOT} COPY ./app/djangoq_setup.sh /djangoq_setup.sh RUN chmod +x /djangoq_setup.sh +COPY ./app/compose/production/app_postgres/start /start +#RUN sed -i 's/\r$//g' /start +RUN chmod +x /start + RUN adduser appuser --system --no-create-home --shell /bin/sh \ && chown -R appuser ${APP_ROOT} USER appuser + +RUN chown appuser /start +RUN chown appuser /djangoq_setup.sh CMD ${STARTUP_COMMAND} \ No newline at end of file diff --git a/app/compose/production/app_postgres/start b/app/compose/production/app_postgres/start index 8afbf70c..39fc4a22 100644 --- a/app/compose/production/app_postgres/start +++ b/app/compose/production/app_postgres/start @@ -1,9 +1,4 @@ #!/bin/bash - -set -o errexit -set -o pipefail -set -o nounset - python /app/manage.py collectstatic --noinput python /app/manage.py migrate python /app/manage.py update_assettype