Generate nginx and Docker artifacts for your Betty site.
# Add to your project's configuration file:
extensions:
nginx:
configuration:
https: False
legacy_entity_redirects: True
www_directory: /var/www(optional, boolean)
Whether to support HTTPS in the public nginx configuration. Requires you to set up SSL certificates yourself.
Defaults to whether or not your project's URL uses HTTPS.
(optional, boolean)
Whether to generate redirects from legacy (pre Betty 0.5) entity URLs.
(optional, string)
The www directory to serve.
Defaults to your project's www directory.
Add the extension to your project configuration. Whenever you generate your site, nginx artifacts will be created.
Additionally, use betty nginx-generate to create these same artifacts without also generating your site.
Launch a Docker container to serve your site locally with betty nginx-serve, or betty nginx-serve --public to launch
a container to serve your site publicly, over the internet.
The Docker images do not yet support HTTPS connections. When hosting your site over HTTPS, you must use a proxy to terminate HTTPS connections and forward HTTP traffic to the container.
The Nginx extension generates the following artifacts relative to your project's output directory:
The Lua code the nginx configuration uses for content negotiation. It must be placed in your nginx's
lua_package_path.
A Docker image build manifest. You may use this to run your own containers. Nginx configuration MUST be placed in
/etc/nginx/conf.d, and the WWW directory MUST exist at /var/www/betty.
Your site's public nginx configuration file. You may deploy this anywhere. You MUST configure lua_package_path. If you
are using HTTPS, you MUST configure SSL certificates.