-
Notifications
You must be signed in to change notification settings - Fork 39
/
router.yaml
43 lines (36 loc) · 1.22 KB
/
router.yaml
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
# https://cloud.google.com/appengine/docs/flexible/reference/app-yaml?tab=python
#
# gcloud -q app deploy --project bridgy-federated router.yaml
# application: bridgy-federated
service: router
env: flex
runtime: python
runtime_config:
operating_system: ubuntu22
runtime_version: "3.12"
resources:
cpu: 1
memory_gb: 1.6
env_variables:
PDS_HOST: atproto.brid.gy
PLC_HOST: plc.directory
APPVIEW_HOST: api.bsky.app
BGS_HOST: bsky.network
MOD_SERVICE_HOST: mod.bsky.app
MOD_SERVICE_DID: did:plc:ar7c4by46qjdydhdevvrndac
# https://bsky.app/profile/gargaj.umlaut.hu/post/3kxsvpqiuln26
CHAT_HOST: api.bsky.chat
CHAT_DID: did:web:api.bsky.chat
automatic_scaling:
min_num_instances: 2
max_num_instances: 10
cpu_utilization:
target_utilization: 0.9
liveness_check:
# default 300; does lowering this speed up deploy? seems like maybe, a bit?
# https://cloud.google.com/appengine/docs/flexible/reference/app-yaml?tab=python#liveness_checks
initial_delay_sec: 30
# https://cloud.google.com/appengine/docs/flexible/python/runtime#application_startup
# https://docs.gunicorn.org/en/latest/settings.html
# TODO: try asyncio w/eventlet workers
entrypoint: gunicorn --workers 1 --threads 20 -b :$PORT router:app