This exists primarily for demonstrating/testing IBM Code Engine. It serves content with Gunicorn.
- Access to the IBM Cloud CLI (Installed or using Cloud Shell from the IBM Cloud Console)
Log-in to the ibmcloud utility
ibmcloud login
Select a resource group if necessary
ibmcloud target -g example-group
Clone this repo
git clone [email protected]:jbernh/code-engine-flask.git
cd code-engine-flask
This example will do the following:
- Create a Code Engine Project
- Upload the source code and create a container image based on the provided Dockerfile
- Store that image in IBM Cloud's image registry
- Run a container from that image on Code Engine
ibmcloud ce create project --name example-project
If you already have an existing project, you can select it instead.
ibmcloud ce select project --name [name]
ibmcloud ce application create --name example-app --port 80 --build-source .
Now we wait. The container will be created and provide you with the URL of your application.