Deploying plumber enabled R application to Bluemix / Cloud Foundry
I am trying to deploy plumber enabled R application to Bluemix / Cloud Foundry using https://github.com/beibeiyang/cf-buildpack-r.git build pack
The application is trivial (app.R):
library(plumber)
api <- plumb("api.R")
PORT <- as.numeric( Sys.getenv('PORT') )
message (PORT)
api$run(port=PORT)
and in my Procfile I have
web: Rscript app.R
In the log files I see that the installation (including the dependencies) completes successfully and my message is printed.
The issue is that I cant access the deployed app. If I use
health-check-type: port
then the app fails the health check and is not accessible at all. If I use
health-check-type: process
The app starts but trying to access its URL results in 502 bad gateway.