Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 

Docker has been there for a while and offers a variety of advantages. SAP Cloud Platform also supports the deployment of Docker Images, which is a feature of Cloud Foundry, for further details the official documentation can be referred.  Cloud Foundry uses Deigo to run the docker images.


In this tutorial, we will run 2 docker images (UI5 and Python) which will be bonded with PostgreSQL services and XSUAA for app routing, apart from these 2 images, an app router will be required to run the route between these applications.

This tutorial is more of a POC, hence all the best practices and security guidelines might not be taken into account 🙂



  1. SAP Cloud Foundry account having (APP Runtime, PostgreSQL Instance, XSUAA).

  2. CF CLI - tutorial for downloading.

  3. App Router -  blog for setting it up, for more understanding - use the link.


Let's Get Started


  1. Use cf login to login to your SAP Cloud Platform sub account and space via command line.

  2. Let us push the ui5 image first (Replace APP-NAME with your application name)

cf push APP-NAME --docker-image munishsuri/ui5-test:latest

3. push the python image (Which will be talking to the PostgreSQL service) (Replace APP-NAME          with your application name)
cf push APP-NAME --docker-image munishsuri/python-test:latest

4. Now we have to configure the app-router , bet before that let us create XSUAA instance and          for  that , let us use xs-security.json to create the service instance.
"xsappname" : "<your app name>",
"tenant-mode" : "dedicated"

go to the directory , where you have saved the xs-security.json file then execute the below      command via cli to create the instance
cf create-service xsuaa application <INSTANCE_NAME> -c xs-security.json

5. Now let us configure the app router.

a. xs-app.json for routing

"authenticationMethod": "route",
"routes": [
"source": "^/myappopen/(.*)$",
"target": "$1",
"destination": "myappopen"
"source": "^/python-test/(.*)$",
"target": "$1",
"destination": "python-test"


b. manifest.yml of app router

things to be configured

  • <APP_ROUTER_NAME> - name which you want to give to the approuter

  • <PATH_OF_APP_ROUTER> - directory where app router is stored

  • <URL_OF_UI5_APP> - the previously deployed ui5 app (docker)

  • <URL_OF_PYTHON_APP> - the previously deployed python app (docker)

  • <XSUAA_INSTANCE_NAME> - the name of instance which was given in the cli.

memory: 256M
destinations: >

Please use the below command
cf push


Now the approuter should be up and running and you can access the app via the below link.



<YOUR_APPA_ROUTER> - will be the URL, you will get post-app deployment. /myappopen/ , was configured in the manifest.yml and xs-app.json


Let us create an instance of PostgreSQL , from the cloud platform sub-account , we will be using the dev version of it.


Post creation of this, we will be using the environment variables values to set up via (though it is not a best practice, for the purpose of POC we are using it), ideally, the app should be able to access the environment variables.


you may bind the instance of PostgreSQL to the python app deployed.

Post Binding copy the parameter values and paste in the ui.

Kindly restart the python application post binding the service.


To View the UI : use the below URL




Click on Set Pstgres Values to the set the Parameter, click on Add Id  to insert a Random number in the DB, which will displayed in the list automatically.



!!! Congratulations !!!

You have successfully deployed Python and UI5 application container on SAP Cloud Platform, having XSUAA  and PostgreSQL in place, along with an app router.