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

Configure production deployment to Google Cloud Run #5

Merged
merged 12 commits into from
Jul 6, 2024

Conversation

bartacc
Copy link
Collaborator

@bartacc bartacc commented Jun 28, 2024

These changes were tested with infrastructure code from that PR on my personal Google Cloud account. The website works correctly.

This PR contains:

  • You can now easily run production build of frontend in local development. Just run dev.py run-app --prod-frontend (or dev.py serve --prod-frontend if containers are already running). The main difference is that production frontend doesn't have hot reload and it packs all css and all js into one file each, which means that pages load much faster.
  • There is now one dockerfile for production and development, which is split into separate stages. It's based on alpine to make the image smaller.
  • Static files in production are now stored in a Google Cloud Storage bucket, rather than served directly by Django server.
  • I've added a script for manual deployment to production.

TODO later:

  • CircleCI deployment to production on each merge to master is currently not configured. I will add it later, but it should be similiar to the current deployment script (probably only authentication commands will change)

@Arsenicro Arsenicro requested a review from Bozydarek July 2, 2024 19:54
@bartacc bartacc merged commit 1f015ff into develop Jul 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant