Skip to main content

Nginx for Betty provides nginx and Docker integration for your Betty sites

Project description

Nginx for Betty 👵

Test Code coverage PyPI releases Supported Python versions Recent downloads Contributor Covenant Follow Betty on Twitter

Generate nginx and Docker artifacts for your Betty site.

Configuration

# Add to your project's configuration file:
extensions:
    nginx:
        configuration:
          https: False
          legacy_entity_redirects: True
          www_directory: /var/www

https

(optional, boolean/none)

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.

legacy_entity_redirects

(optional, boolean)

Whether to generate redirects from legacy (pre Betty 0.5) entity URLs.

www_directory

(optional, string)

The www directory to serve.

Defaults to your project's www directory.

Usage

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.

Docker & known limitations

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.

Artifacts

The Nginx extension generates the following artifacts relative to your project's output directory:

./nginx/content_negotiation.lua

The Lua code the nginx configuration uses for content negotiation. It must be placed in your nginx's lua_package_path.

./nginx/Dockerfle

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.

./nginx/nginx.conf

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

betty_nginx-0.2.0a12.tar.gz (49.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

betty_nginx-0.2.0a12-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file betty_nginx-0.2.0a12.tar.gz.

File metadata

  • Download URL: betty_nginx-0.2.0a12.tar.gz
  • Upload date:
  • Size: 49.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for betty_nginx-0.2.0a12.tar.gz
Algorithm Hash digest
SHA256 74fce52370f20b24086a2de7ef2e824e3fc24205c60b21a60bba8a15dea87a10
MD5 63dfb244b9698bd3419dbb80c5a0d6a5
BLAKE2b-256 386e4e1a898397800e565b9554a349bcf4490e50c0c873ba89472069e22ce63c

See more details on using hashes here.

File details

Details for the file betty_nginx-0.2.0a12-py3-none-any.whl.

File metadata

  • Download URL: betty_nginx-0.2.0a12-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for betty_nginx-0.2.0a12-py3-none-any.whl
Algorithm Hash digest
SHA256 f2974a17bcbe8d25fab75bb4ee9ef6c9119a1f7a9169df532fc7ab17f7ee9c96
MD5 bf3b7296e25aa1bab485b402ac71f244
BLAKE2b-256 5872f896f16a4eab201b907dfc416e6fb904059221c2aa2804e620dbbe80bafa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page