Here you can learn how to use your NGINX, HTTPD, or frontend JavaScript app to VMware Tanzu Application Service for VMs (TAS for VMs) and how to configure your app to use the Web Servers buildpack. The Web Servers Buildpack is in beta, so VMware discourages use with production workloads.
TAS for VMs automatically uses this buildpack if it detects an nginx.conf
, httpd.conf
, or package.json
file in the root directory of your project.
To deploy an app, run: cf push myApp -b web_servers_cnb_beta -s cflinuxfs4
This section is based on the Paketo Documentation for the Web Servers Buildpack.
Before pushing the application, the app developer must first build the app’s static assets (follow steps 1-3 in the Paketo Documentation).
After the static assets are built, push the static assets without starting the application:
cf push myApp -b web_servers_cnb_beta -s cflinxufs4 --no-start
Set up the correct environment variables:
cf set-env myApp BP_NODE_RUN_SCRIPTS build
cf set-env myApp BP_WEB_SERVER nginx
cf set-env myApp BP_WEB_SERVER_ROOT build
Where:
BP_NODE_RUN_SCRIPTS
is the name of the build script from the first step in the Paketo documentation.BP_WEB_SERVER_ROOT
is set to the build output directory.BP_WEB_SERVER
is set to the applicable server: HTTPD or NGINX.Start the app:
cf start myApp
This version of TAS for VMs supports Web Servers CNB 0.8.0.
Join the #buildpacks channel in our Slack community if you need help.
For more information about using and extending the Web Servers buildpack in Cloud Foundry, see the Paketo Web Servers buildpack GitHub repository.