Skip to content

nginx job from nginx/1.17.0

Github source: 60baba9 or master branch

Properties

drain

A placeholder to add a custom drain script

Default
  |+
    #!/bin/bash
    echo 0

nginx_conf

The contents of nginx.conf, the primary configuration file

post_start

A placeholder to to run steps after nginx has started

Default
'#!/bin/bash'

pre_start

The contents of the pre-start script. This can be used to populate the nginx server’s document_root, e.g. #!/bin/bash -ex NGINX_DIR=/var/vcap/store/nginx if [ ! -d $NGINX_DIR ]; then mkdir -p $(basename $NGINX_DIR) cd $(basename $NGINX_DIR) curl -L https://github.com/cunnie/sslip.io/archive/v1.tar.gz | tar xzf - mv sslip.io-1 $NGINX_DIR chown -R vcap:vcap $NGINX_DIR fi

Default
'#!/bin/bash'

ssl_chained_cert

This is the chained SSL certificate for the website; This is in PEM format. The topmost certificate should be the certificate for the website itself. (e.g. in the case of sslip.io, the certificate for sslip.io). The second-from-top certificate should be the intermediate certificate (e.g. “COMODO RSA Domain Validation Secure Server CA”). If there is another intermediate certificate, that should follow (e.g. “COMODO RSA Certification Authority”). There is no reason to include the root certificate, but there is no harm in including it either. It should be the last certificate (bottom-most). Its location is /var/vcap/jobs/nginx/etc/ssl_chained.crt.pem

Default
""

ssl_key

The SSL key, can be empty, should be in PEM format. Its location is /var/vcap/jobs/nginx/etc/ssl.key.pem

Default
""

Templates

Templates are rendered and placed onto corresponding instances during the deployment process. This job's templates will be placed into /var/vcap/jobs/nginx/ directory (learn more).

  • bin/ctl (from ctl.sh)
  • bin/drain (from drain.erb)
  • bin/post-start (from post-start.erb)
  • bin/pre-start (from pre-start.erb)
  • etc/nginx.conf (from nginx.conf.erb)
  • etc/ssl.key.pem (from ssl_key.erb)
  • etc/ssl_chained.crt.pem (from ssl_chained_cert.erb)

Packages

Packages are compiled and placed onto corresponding instances during the deployment process. Packages will be placed into /var/vcap/packages/ directory.