Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/setup-node…
Browse files Browse the repository at this point in the history
…-4.0.2
  • Loading branch information
ForestEckhardt authored Feb 9, 2024
2 parents 34c7296 + f2606bf commit 062ff99
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
22 changes: 22 additions & 0 deletions content/docs/howto/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,28 @@ of the app source code.

Configuring a version of miniconda is not supported.

#### Using `BP_CONDA_SOLVER`

The original conda solver may suffer slowdowns depending on various factors such
as number of channels configured, package pinning precision, etc. This is an
issue that has been worked on and since a couple of releases, the mamba solver
can be used in place of the original.

To change the default solver used to create the conda environment, set the
`BP_CONDA_SOLVER` environment variable to "mamba". This is the currently only
value supported.

{{< code/copyable >}}
pack build my-app --env BP_CONDA_SOLVER=mamba --buildpack paketo-buildpacks/python \
--builder paketobuildpacks/builder:base
{{< /code/copyable >}}

**Note:** This does not change the buildpack to be mamba based, only their solver
is used.

More information can be found in the [release notes]
(https://github.com/paketo-buildpacks/miniconda/releases/latest)

### Poetry

Poetry is a tool to manage both third-party application dependencies and
Expand Down
25 changes: 25 additions & 0 deletions content/docs/howto/web-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ files to `/workspace/my-build-directory`.
BP_WEB_SERVER_ROOT=htdocs
{{< /code/copyable >}}

#### Set Location Path for the Server
In auto-generated `nginx.conf`, the
[`server.location`](https://nginx.org/en/docs/http/ngx_http_core_module.html#location)
directive is set to the catch-all or default location block. You can override
this by setting the `BP_WEB_SERVER_LOCATION_PATH` variable.

{{< code/copyable >}}
BP_WEB_SERVER_LOCATION_PATH="/custom"
{{< /code/copyable >}}

#### Enable Push-State Routing
The `BP_WEB_SERVER_ENABLE_PUSH_STATE` variable enables push state routing
functionality. This is useful for single-page web applications.
Expand All @@ -221,6 +231,21 @@ endpoint.
BP_WEB_SERVER_FORCE_HTTPS=true
{{< /code/copyable >}}

#### Obtain real-time status info
The `BP_NGINX_STUB_STATUS_PORT` variable exposes a handful of NGINX Server
metrics via the
[`stub_status`](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html#stub_status)
module which provides basic status information on provided port. This comes
handy for monitoring the server. For example using [NGINX Prometheus
Exporter](https://github.com/nginxinc/nginx-prometheus-exporter)

The info will be made available at the path `/stub_status` at the specified
port. Make sure that this port isn't used anywhere else in your application.

{{< code/copyable >}}
BP_NGINX_STUB_STATUS_PORT=8083
{{< /code/copyable >}}

#### Set Up Basic Authentication
You are able to provide basic authentication credentials via a [service
binding][service-binding] of type `htpasswd` that specifies the contents of a
Expand Down
6 changes: 6 additions & 0 deletions content/docs/reference/nginx-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ Defaults to `public`, setting this allows you to modify the location of the
static files served by the web server with either an absolute file path or a
file path relative to `/workspace`.

### BP_WEB_SERVER_LOCATION_PATH
Set server's location directive.

### BP_WEB_SERVER_ENABLE_PUSH_STATE
Enables push state routing functionality.

### BP_WEB_SERVER_FORCE_HTTPS
Allows you to enforce HTTPS for server connections by redirecting all requests
to use the HTTPS protocol.

### BP_NGINX_STUB_STATUS_PORT
Gets NGINX basic status info via [`stub_status`](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html#stub_status).

## Supported Service Bindings
The NGINX buildpack can be configured using [service bindings][service-binding].
####
Expand Down

0 comments on commit 062ff99

Please sign in to comment.