# Deploying a custom image

In case you might want to deploy your own docker image of on our more of the servers the easiest way to do this is to deploy to a custom image to a public dockerhub. Currently the Helm files assume a public dockerhub repository. If you want it be private an key for authenticating with Dockerhub, or another registry should be added.

Most likely the custom image will be a version of the Frontend. So for instance in your values yaml overwrite the name of the image:

```
frontend:
  # Deployment container is what is eventually run in the pod
  deploymentContainer:
    name: frontend
    # Docker image for this pod
    image: dockerhubname/imagename:tag
```

Run upgrade command:

```
helm upgrade  -f custom-values.yaml openstad . -n openstad
```

## Push your image automatically to dockerhub

Every repository has a travis.yml file that would work automatically if a travis account was made dockerhub images are pushed. Both Dockerhub and Travis are free for open source project.

For instance the frontend has a .travis.yml file and de docker\_publish script: <https://github.com/Amsterdam/openstad-frontend/tree/development>

The publish script cert environment variables, these can be saved in repository settings in the Travis dashboard:

* DOCKER\_USERNAME
* DOCKER\_PASSWORD

## Auto deploy to cluster

It's possible, we do it for staging and release, to autodeploy to a Kubernetes cluster. See the docker\_deploy file in the repository for this.

For deploy to work, the above variables are necessary and needed to add the kubernetes config file as a variable:

* KUBE\_CONFIG

This is the kubeconfig generated encoded to a base64 string. For instance can be generated like this:

`cat ${HOME}/.kube/config | base64 | pbcopy`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openstad.org/openstad/technical/deploying/deploying-a-custom-container.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
