To follow this tutorial, you need a Clever Cloud account and Clever Tools:
npm i -g clever-tools
clever loginClone this repository:
git clone https://github.com/CleverCloud/network-groups-example
cd network-groups-exampleCreate and configure the private service:
# Note the application ID, we'll need it later
clever create -t python privateApp
# Configure the application
clever env set APP_FOLDER "privateApp" --alias privateApp
clever env set CC_RUN_COMMAND "uv run main.py" --alias privateApp
# Deploy the application without following the logs
clever deploy --exit-on deploy-start --alias privateAppCreate and configure the public website:
# Note the application ID, we'll need it later
clever create -t node publicApp
# Configure the application
clever env set APP_FOLDER "publicApp" --alias publicAppCreate the network group and link the two applications to it:
clever features enable ng
clever ng create myNGDemo --link [privateApp_id],[publicApp_id]Tip
Replace [privateApp_id] and [publicApp_id] with the application IDs you noted earlier.
Get the private application domain within the network group, use it for public application configuration:
clever env set PRIVATE_SERVICE_URL "http://$(clever ng get [privateApp_id] --format json | jq -r '.domainName'):4242" --alias publicAppDeploy the public website without following the logs
clever deploy --alias publicApp
clever open --alias publicAppYou should see the public website, inverting the provided text through the private service available only within the Clever Cloud Network Group. Learn more about Network Groups.