Skip to content

About

Automated deployment of a web app using IBM Cloud Code Engine, with seamless GitHub integration and HTTPS support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

© The Chancellor, Masters and Scholars of The University of Oxford. All rights reserved.

Explore different providers

This course is available for multiple cloud providers. Choose your preferred platform:

Instructions

Create a new container registry namespace named hello-registry in region eu-gb img00
Create a new serverless project named hello-project in region eu-gb img0
Create a new application called hello-ibm-cloud img1
Select "Build container image from source code" then press "Specify build details" img2
Set the source to https://github.com/Oxford-Research-Cloud-Competency-Centre/Hello-ibm-cloud img3
Set the strategy to Cloud Native Buildpack img4
Set the output to hello-ibm-cloud in hello-registry using a Code Engine Managed Secret in the London region img5
Change the default listening port from 8080 to 80 img10
Find the public URL img12

Test the app

img8

Going further

Adding an API endpoint

Add the following code in app.py

@app.route("/hello_api")
def hello_api():
    return {
		"name": "Wrinkle Five Star",
		"species": "Duck",
		"breed": "American Pekin",
		"hatching_date": "2020-09-09",
		"sex": "Male"
    }

Then test your endpoint

img11

Local testing

You need to test your changes before publishing them.

Install Python
https://www.python.org/downloads/

Install dependencies
python -m pip install --break-system-packages -r requirements.txt

Run flask
python -m flask run --port=80

Open localhost in your browser.

img9

Cleaning up

To find and delete all active resources, go to cloud.ibm.com/resources img13
You can then go to Manage / Access (IAM) and delete any remnant for example this service ID img14

About

Automated deployment of a web app using IBM Cloud Code Engine, with seamless GitHub integration and HTTPS support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages