Project to be used with Kompose (Kubernetes) to generate an Openshift project. The project will run a flask application using uwsgi and it will be exposed using Nginx. Also includes Postgresql and Redis Images.
- Openshift CLI: https://github.com/openshift/origin/tags
- Kompose: http://kompose.io/
- Docker Tools: https://www.docker.com/products/docker-toolbox
kompose -f docker-compose-prod.yml --provider openshift convert -o template.yaml
oc create -f template.yaml
Deploy to Openshift:
kompose -f docker-compose-prod.yml --provider openshift up -v
Remove the deployed artifacts from Openshift:
kompose -f docker-compose-prod.yml --provider openshift down -v
HOST
: Host of the project (using .<docker_machine_ip>.xip.io will make the application available on local machines)POSTGRESQL_USER
: User for Postgresql databasePOSTGRESQL_DATABASE
: Database namePOSTGRESQL_PASSWORD
: User Postgresql password
docker-machine start openshift
docker-machine env openshift
eval $(docker-machine env openshift)
oc cluster up
oc cluster down