Skip to content
Snippets Groups Projects
Verified Commit ca9e6211 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[Docker] Move collectstatic to entrypoint script

This is needed because when updating an existing environment, the
existing volume will shadow away the changes done on container build.
parent 74e1881b
No related branches found
No related tags found
No related merge requests found
......@@ -42,8 +42,7 @@ RUN mkdir -p /var/lib/biscuit/media /var/lib/biscuit/static /var/lib/biscuit/bac
# Build messages and assets
RUN python manage.py compilemessages; \
python manage.py yarn install; \
python manage.py collectstatic --no-input --clear
python manage.py yarn install
# Clean up build dependencies
RUN apt-get remove --purge -y \
......@@ -57,7 +56,6 @@ RUN apt-get remove --purge -y \
pip uninstall -y poetry; \
rm -f /var/lib/apt/lists/*_*; \
rm -rf /root/.cache; \
rm -rf biscuit/node_modules; \
rm -rf /usr/local/lib/node_modules
# Declare a persistent volume for all data
......
......@@ -19,6 +19,7 @@ done
python manage.py flush --no-input
python manage.py migrate
python manage.py collectstatic --no-input --clear
if [[ -n "$@" ]]; then
exec "$@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment