mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-25 03:33:45 +03:00
added manage command
This commit is contained in:
parent
af5f1f8afc
commit
3adeb7c5a7
|
@ -48,6 +48,14 @@ COPY ./compose/production/django/entrypoint /entrypoint
|
|||
RUN sed -i 's/\r$//g' /entrypoint
|
||||
RUN chmod +x /entrypoint
|
||||
|
||||
COPY ./compose/production/django/manage /manage
|
||||
RUN sed -i 's/\r$//g' /manage
|
||||
RUN chmod +x /manage
|
||||
|
||||
COPY ./compose/production/django/manage /manage.py
|
||||
RUN sed -i 's/\r$//g' /manage
|
||||
RUN chmod +x /manage
|
||||
|
||||
COPY ./compose/local/django/start /start
|
||||
RUN sed -i 's/\r$//g' /start
|
||||
RUN chmod +x /start
|
||||
|
|
14
compose/production/django/manage
Normal file
14
compose/production/django/manage
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
if [ -z "${POSTGRES_USER}" ]; then
|
||||
base_postgres_image_default_user='postgres'
|
||||
export POSTGRES_USER="${base_postgres_image_default_user}"
|
||||
fi
|
||||
export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
|
||||
|
||||
|
||||
exec /venv/bin/python /app/manage.py "$@"
|
Loading…
Reference in New Issue
Block a user