make dev/prod hardcoded uvicorn to port 10500 with no way to override it, so config.PORT (and everything derived from it - INTERNAL_BASE_URL, Devii's own base URL defaults) stayed 10500 regardless of what port the process actually bound to. DEVPLACE_PORT now drives all of it, defaulting to 10500. Docker's existing PORT var (the externally published port via nginx) is unrelated and untouched; its app container pins DEVPLACE_PORT to 10500 explicitly so a bare-metal .env value can never leak in and desync it from the Dockerfile's fixed internal bind port. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
52 lines
2.2 KiB
Bash
52 lines
2.2 KiB
Bash
# Copy to .env and adjust. Loaded by docker-compose (env_file) and by the app
|
|
# at startup (python-dotenv). .env is git-ignored; this example is committed.
|
|
|
|
# Session signing key. CHANGE THIS for any real deployment.
|
|
SECRET_KEY=change-me
|
|
|
|
# Database. Leave unset to use the shared data/devplace.db (the Docker app
|
|
# container bind-mounts ./ to /app, so it reads and writes the same file as
|
|
# `make dev`). Set only to point at a different SQLite file.
|
|
# DEVPLACE_DATABASE_URL=sqlite:////app/data/devplace.db
|
|
|
|
# Single root for ALL runtime data (DB, uploads, VAPID keys, locks, bot state,
|
|
# zip/fork staging, container workspaces). Lives OUTSIDE the package and is never
|
|
# served via /static. Defaults to <repo>/data. The docker daemon must be able to
|
|
# bind-mount this dir for container /app mounts; point it at a persistent volume
|
|
# in production. nginx also reads <DEVPLACE_DATA_DIR>/uploads to serve uploads.
|
|
# DEVPLACE_DATA_DIR=/var/lib/devplace
|
|
|
|
# Container Manager (admin-only, enabled via docker-compose.containers.yml).
|
|
# Host the /p/<slug> ingress proxy dials to reach a published container port.
|
|
# On the host: 127.0.0.1 (default). Containerized app reaching host ports:
|
|
# host.docker.internal.
|
|
# DEVPLACE_CONTAINER_PROXY_HOST=host.docker.internal
|
|
# GID of /var/run/docker.sock on the host (getent group docker | cut -d: -f3),
|
|
# so the UID-1000 app can use the socket.
|
|
# DOCKER_GID=999
|
|
|
|
# Public origin for absolute URLs (SEO, canonical links, push). Empty = derive
|
|
# from the request.
|
|
DEVPLACE_SITE_URL=
|
|
|
|
# Host port the nginx front door binds (Docker only - the app container's own
|
|
# internal port stays fixed).
|
|
PORT=10500
|
|
|
|
# Port the uvicorn process itself binds to for `make dev`/`make prod` (bare
|
|
# metal, no Docker/nginx in front). Also what the app calls itself on
|
|
# internally (DEVII_BASE_URL default, INTERNAL_GATEWAY_URL). Unrelated to
|
|
# PORT above - leave unset unless running bare metal on a non-default port.
|
|
# DEVPLACE_PORT=10500
|
|
|
|
# nginx upload ceiling. Must be >= the admin-configurable max_upload_size_mb.
|
|
NGINX_MAX_BODY_SIZE=50m
|
|
|
|
# Optional nginx micro-cache for proxied GETs.
|
|
NGINX_CACHE_ENABLED=false
|
|
NGINX_CACHE_MAX_SIZE=1g
|
|
|
|
# Run the app container as this host user so shared files keep dev ownership.
|
|
DEVPLACE_UID=1000
|
|
DEVPLACE_GID=1000
|