Fix image display in Docker by loading initial fixtures on startup
All checks were successful
Docker / build (release) Successful in 9s
All checks were successful
Docker / build (release) Successful in 9s
This commit is contained in:
parent
dcd944b8c6
commit
1ac1ac81b4
2 changed files with 2 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y gettext && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN python manage.py compilemessages
|
RUN SECRET_KEY=dummy python manage.py compilemessages
|
||||||
|
|
||||||
# Create volume mount points
|
# Create volume mount points
|
||||||
RUN mkdir -p /app/media /app/static /app/data
|
RUN mkdir -p /app/media /app/static /app/data
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@ set -e
|
||||||
|
|
||||||
python manage.py collectstatic --noinput
|
python manage.py collectstatic --noinput
|
||||||
python manage.py migrate --noinput
|
python manage.py migrate --noinput
|
||||||
|
python manage.py loaddata initial
|
||||||
python manage.py create_default_admin
|
python manage.py create_default_admin
|
||||||
exec gunicorn photo21.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
exec gunicorn photo21.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue