Skip to content

Commit

Permalink
Copy startup file
Browse files Browse the repository at this point in the history
  • Loading branch information
Bachibouzouk committed Jan 28, 2025
1 parent 7577825 commit d341c45
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
10 changes: 10 additions & 0 deletions app/compose/production/app_postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,18 @@ 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}

RUN chown appuser /start
RUN chown appuser /djangoq_setup.sh

USER appuser



CMD ${STARTUP_COMMAND}
19 changes: 8 additions & 11 deletions app/compose/production/app_postgres/start
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/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
python /app/manage.py update_valuetype
python /app/manage.py compilemessages
gunicorn epa.wsgi:application --bind 0.0.0.0:5000 --workers=4 --timeout=120 --chdir=/app
echo COLLECTSTATIC
python /src/manage.py collectstatic --noinput
echo MIGRATE
python /src/manage.py migrate
python /src/manage.py update_assettype
python /src/manage.py update_valuetype
python /src/manage.py compilemessages
gunicorn /src/epa.wsgi:application --bind 0.0.0.0:8000 --workers=4 --timeout=120 --chdir=/src

0 comments on commit d341c45

Please sign in to comment.