Repository navigation
Expand file tree
/
Copy pathconfigmap.yaml
More file actions
45 lines (45 loc) · 2.46 KB
/
Copy pathconfigmap.yaml
File metadata and controls
45 lines (45 loc) · 2.46 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
apiVersion: v1
kind: ConfigMap
metadata:
name: codeforphilly-env
data:
CFP_DATA_REPO_PATH: "/app/data"
CFP_PRIVATE_STORAGE_PATH: "/app/private-storage"
CFP_WEB_DIST_PATH: "/app/apps/web/dist"
# Public-facing host. Used by the server-side markdown renderer to flag
# anchors with a foreign host for target=_blank rel=noopener nofollow.
# Sandbox overlay overrides this to next-v2.codeforphilly.org.
CFP_SITE_HOST: "codeforphilly.org"
# From-address for outbound notifications. Sender domain (codeforphilly.org)
# must be a verified Postmark sender signature (SPF + DKIM + Return-Path)
# before flipping POSTMARK_SERVER_TOKEN on in production. See
# plans/postmark-notifier.md and docs/operations/secrets.md.
CFP_NOTIFICATION_FROM: "Code for Philly <notifications@codeforphilly.org>"
GIT_AUTHOR_EMAIL: "api@codeforphilly.org"
GIT_AUTHOR_NAME: "CodeForPhilly API"
NODE_ENV: "production"
# Bump Node's old-space heap ceiling above the default (~400Mi on Linux
# containers) so the in-memory record set + secondary indices + FTS fit.
#
# 512 (was 2048): gitsheets 1.4.1 switched the TOML parser to smol-toml,
# fixing the #132 heap blowup at its root (@iarna's parser pinned ~12x each
# record's source in V8 sliced/cons-strings). A full boot from the
# `published` import now measures ~123Mi heap / ~321Mi RSS (FTS5 is off-heap
# and tiny, ~40Mi). 512 is ~4x the measured boot heap — ample for request
# handling + gitsheets tree mutations — while leaving the node (~3.9Gi) most
# of its memory back. The earlier 2048/2.5Gi was sized for the leak, not the
# real working set.
NODE_OPTIONS: "--max-old-space-size=512"
PORT: "3001"
STORAGE_BACKEND: "filesystem"
# The runtime-served branch. `published` is the long-term sandbox + prod
# default — it accumulates importer snapshots (via merges from
# `legacy-import`) on top of new-in-v1 records the running API writes.
# Override per-pod via the `CFP_DATA_BRANCH` env var, e.g. point a debug
# deployment at `fixture` (small handful of seed records) or directly at
# `legacy-import` (raw snapshot, no merged runtime writes).
CFP_DATA_BRANCH: "published"
# SSH key for the data repo deploy key (private branch reads).
# accept-new keeps first-connect simple; strict host-key checking via
# known_hosts ConfigMap is an overlay concern.
GIT_SSH_COMMAND: "ssh -i /etc/cfp-data-deploy-key/id_ed25519 -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null"