Skip to content

feature: Serve app related static content

Ejez requested to merge ejez/auto-deploy-image:auto-devops-static-files into master

Many applications have static content that needs to be served along with the app dynamic content. Some of these apps (for example django) leave the task of serving static content to the right tool (for example nginx). This is a good design concept, but results in gitlab auto devops missing the static part of the app in its deployments.

This MR solves this issue by adding an nginx k8s deployment along with the main app deployment.

These are the main additions:

  • A k8s pvc to hold the static files.
  • A helm chart hook to collect the app static files in the k8s volume.
  • An nginx app deployed using bitnami/nginx helm chart dependency, to serve the static files.
  • A path added to the main app ingress pointing to the nginx service.

Tested with django

Merge request reports