mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +01:00
3ef42ddd38
* Add docker image that uses nginx unit instead of gunicorn 🦄🔫 * Add unit build to CI * Fix duplicate id * try 3.11 * Only build for amd64 need python3.11 for unit image on arm
14 lines
447 B
Bash
Executable File
14 lines
447 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# To ensure we are able to expose metrics from multiple processes, we need to
|
|
# provide a directory for `prometheus_client` to store a shared registry.
|
|
export PROMETHEUS_MULTIPROC_DIR=$(mktemp -d)
|
|
chmod -R 777 $PROMETHEUS_MULTIPROC_DIR
|
|
trap 'rm -rf "$PROMETHEUS_MULTIPROC_DIR"' EXIT
|
|
|
|
export PROMETHEUS_METRICS_EXPORT_PORT=8001
|
|
export STATSD_PORT=${STATSD_PORT:-8125}
|
|
|
|
exec /usr/local/bin/docker-entrypoint.sh unitd --no-daemon
|