-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperch.yaml
More file actions
74 lines (66 loc) · 2.39 KB
/
Copy pathperch.yaml
File metadata and controls
74 lines (66 loc) · 2.39 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# perch.yaml -- declarative manifest for all hosted workloads.
#
# Perch reconciles the host's running containers to match this file. Define
# applications, agents, functions, and managed backend services here, then run
# `perch up`. Workloads run as hardened containers with routing, health checks,
# scheduling, bindings, and drift detection.
#
# Secrets are ${ENV_VAR} references resolved at apply time and never stored here.
# Managed-service credentials are generated once and kept in .perch/state.json
# (git-ignored) -- not in this file.
project: my-stack
defaults:
restart: unless-stopped
resources: { memory: 512m, cpus: "1.0" }
prune: false # true: remove managed containers not present in this file
services:
# --- managed backend services (the "tree" workloads perch on) --------
- name: db
type: postgres # pgvector/pgvector image; vector-ready
version: "16"
extensions: [pgvector]
backup:
schedule: "0 2 * * *" # nightly dump (requires `perch scheduler`)
retain: 7
# - name: cache
# type: cache # Redis with append-only persistence
#
# - name: store
# type: storage # MinIO (S3-compatible)
# buckets: [uploads, exports]
#
# - name: api
# type: rest-api # PostgREST auto-API over `db`
# database: db
#
# - name: identity
# type: auth # Zitadel: OIDC/OAuth, users, sessions
# database: db
# --- application workload --------------------------------------------
- name: web
type: webapp
build:
context: ./examples/hello-web
port: 8080
route:
host: web.localhost
health:
path: /
bindings: [db] # injects DATABASE_URL / PG* env automatically
env:
- { key: GREETING, value: "hello from perch" }
# --- function workload (builds + runs user code) ---------------------
# - name: webhook
# type: function
# runtime: python312
# build: { context: ./functions/webhook }
# port: 8080
# bindings: [db]
# --- agent workload (long-lived or scheduled) ------------------------
# - name: report-agent
# type: agent
# build: { context: https://github.com/sknib1337/report-agent }
# schedule: "0 */6 * * *" # omit for a continuous worker
# bindings: [db]
# env:
# - { key: ANTHROPIC_API_KEY, value: "${ANTHROPIC_API_KEY}", secret: true }