Repository navigation
Expand file tree
/
Copy path.env.prod.example
More file actions
45 lines (37 loc) · 2.19 KB
/
Copy path.env.prod.example
File metadata and controls
45 lines (37 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Production environment for deploy/compose.prod.yml.
#
# Never commit the real file. On the VPS run `make prod-init` (scripts/init-prod-env.sh): it copies this file to
# deploy/.env.prod, generates every empty *PASSWORD= value, derives APP_IMAGE and COMPOSE_PROJECT_NAME from `git remote`, and
# sets mode 600. Then fill the REQUIRED block below and run `make prod-up`.
# ============================================================== REQUIRED (compose refuses to start without them)
# Public hostname. Caddy requests a Let's Encrypt certificate for it, so its A record must already point at this VPS.
DOMAIN=
# Let's Encrypt account e-mail: certificate expiry warnings go here.
ACME_EMAIL=
# Generated by `make prod-init` (openssl rand -hex 24). Never reuse the local app/app defaults on a public host.
POSTGRES_PASSWORD=
# ============================================================== FILLED BY `make prod-init`
# Image Watchtower follows. GHCR requires lowercase; derived from the git remote.
APP_IMAGE=ghcr.io/owner/repo
# Compose project name (volume and network prefix). Keeps two apps on one VPS from sharing a `db` volume.
COMPOSE_PROJECT_NAME=app
# ============================================================== TUNING (defaults are fine)
# `latest` follows every release. For a rollback: `make prod-rollback TAG=1.4.1`.
APP_IMAGE_TAG=latest
# Two replicas + Caddy's dynamic upstreams = zero-downtime rolling restarts on one VPS.
APP_REPLICAS=2
# Per-replica container memory ceiling; the JVM takes 75% of it (JAVA_TOOL_OPTIONS in the Dockerfile).
APP_MEM_LIMIT=512m
# Hikari pool per replica. replicas × pool must stay below Postgres max_connections (50).
DB_POOL_SIZE=5
# Label attached to every metric; the dashboard's env selector reads it.
APP_ENV=prod
POSTGRES_DB=app
POSTGRES_USER=app
# Postgres is bound to 127.0.0.1 on the VPS only; reach it through `make vps-psql` (SSH tunnel), never publicly.
POSTGRES_HOST_PORT=5432
# Seconds between registry checks for a new image.
WATCHTOWER_POLL_INTERVAL=60
# Only when the GHCR package is private: the config.json written by `docker login ghcr.io` (the file, not its dir),
# e.g. /home/deploy/.docker/config.json. Leave empty for a public package.
DOCKER_CONFIG_FILE=