Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect static files during deployment #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agoncharov-reef
Copy link
Contributor

During standard updating of frontend files and redeploying, I noticed that app was using old static files instead of new ones - until I manually ran collectstatic and restarted the app.

This happens because:

  • we collect static files during image build; these files are "baked" into resulting docker image
  • we have backend_static volume in docker-compose which is shared between app and nginx containers
  • that backend_static volume is not available during image build, so static files inside it are not updated

Proposal:

  • don't collect static files during image build
  • collect static files during deployment - by running temporary instance of app and collecting files into backend_static volume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant