Something went wrong. Try again.
🌉 A bridge between decentralized social networks fed.brid.gy
Something went wrong. Try again.
bridgy-fed router.yaml
2.2 kB · 64 lines
YAML
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465# 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: routerenv: flexruntime: pythonruntime_config: operating_system: ubuntu24 # keep this in sync with the test job image in .circleci/config.yml! # change to 3.11 to use Cloud Profiler runtime_version: "3.14"
resources: cpu: 1 memory_gb: 2.5
# run in default VPC for this project# https://cloud.google.com/appengine/docs/flexible/using-shared-vpc# https://cloud.google.com/appengine/docs/flexible/reference/app-yaml#network_settings# https://cloud.google.com/vpc/docs/serverless-vpc-access#supported_servicesnetwork: name: projects/bridgy-federated/global/networks/default
# uncomment to serve external requests, eg getRepo XRPC calls # instance_ip_mode: external
env_variables: DATASTORE_DB: us-single-region 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 SNAPCHAIN_HOST: crackle.farcaster.xyz MEMCACHE_HOST: '10.126.144.67'
# https://github.com/googleapis/python-ndb/blob/c55ec62b5153787404488b046c4bf6ffa02fee64/google/cloud/ndb/utils.py#L78-L81 # NDB_DEBUG: true
automatic_scaling: min_num_instances: 1 max_num_instances: 50 cpu_utilization: target_utilization: 0.85 # tried this in an attempt to cut down instance count, but it backfired # somehow and kept us at the max of 10 instances # target_concurrent_requests: 100
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 workersentrypoint: gunicorn --workers 2 --threads 100 -b :$PORT router:app