Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
/ static Public archive

Docker image for serving static content.

License

Notifications You must be signed in to change notification settings

4ops/static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes app static

Miminal container with nginx, optimized for serving static content in kubernetes cluster.

Building image with content

Build your own container with static files:

$ docker build . -t my.registry.com/path/to/image:v1.0.0
$ docker push my.registry.com/path/to/image:v1.0.0

Deploying in kubernetes cluster

Customize template github.com/4ops/static with local kustomization.yaml:

Deploy your configuration:

$ kubectl apply -k .

Kustomize template for GitLab CI example:

$ cat <<EOF | kubectl apply -k -
namespace: ${CI_ENVIRONMENT_NAME}

namePrefix: ${CI_PROJECT_NAME}-
nameSuffix: -content

commonLabels:
  component: landing
  project: ${CI_PROJECT_NAME}

bases:
  - github.com/4ops/static
  - github.com/4ops/static/add/pdb

images:
  - name: 4ops/static
    newName: ${CI_REGISTRY_IMAGE}
    newTag: ${CI_PIPELINE_ID}
EOF