xcoulon / go-url-shortener

Sample URL shortener written in Golang
Apache License 2.0
14 stars 4 forks source link
golang sample-app

= go-url-shortener

Sample URL shortener written in Golang, to deploy on Kubernetes/Minikube by following the instructions in https://medium.com/@xcoulon/deploying-your-first-web-app-on-minikube-6e98d2884b3a[this article].

License: Apache License 2.0

== Deployment on OpenShift

run the following commands:

# deploy the database secrets (credentials)
oc apply -f templates/database-secrets.yml
# deploy the database (postgres 10)
oc apply -f templates/database-deployment.openshift.yml
# deploy the internal service
oc apply -f templates/database-service.yml

# create the web app config 
oc apply -f templates/webapp-config.yaml
# create a deployment config for the web app
oc apply -f templates/webapp-deploymentconfig.yml
# expose the webapp as a node service
oc apply -f templates/webapp-service.yml

# rollout the latest version of the webapp (if an image already exists in the container registry)
oc rollout latest deploymentconfigs/webapp

Once the deployment config is in place, just deploy a new version of the webapp with make minishift-image && make push-minishift

== TODO