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.

Push an app onto the Web Servers Buildpack

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.

Deploy HTTPD and NGINX apps

To deploy an app, run: cf push myApp -b web_servers_cnb_beta -s cflinuxfs4

Frontend javaScript apps

This section is based on the Paketo Documentation for the Web Servers Buildpack.

  1. Before pushing the application, the app developer must first build the app’s static assets (follow steps 1-3 in the Paketo Documentation).

  2. 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
    
  3. 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.
  4. Start the app:

    cf start myApp
    

Supported versions

This version of TAS for VMs supports Web Servers CNB 0.8.0.

Help and support

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.

check-circle-line exclamation-circle-line close-line
Scroll to top icon