2023-09-05 19:06:07 +00:00
|
|
|
# https://cloud.google.com/appengine/docs/flexible/reference/app-yaml?tab=python
|
|
|
|
#
|
|
|
|
# gcloud -q app deploy --project bridgy-federated hub.yaml
|
|
|
|
|
|
|
|
# application: bridgy-federated
|
|
|
|
|
2023-09-11 04:54:28 +00:00
|
|
|
service: hub
|
2023-09-05 19:06:07 +00:00
|
|
|
env: flex
|
|
|
|
runtime: python
|
|
|
|
runtime_config:
|
|
|
|
operating_system: ubuntu22
|
2023-09-29 18:23:50 +00:00
|
|
|
runtime_version: "3.11"
|
2023-09-11 04:54:28 +00:00
|
|
|
|
2023-09-29 21:28:36 +00:00
|
|
|
# can't be internal because Bluesky BGS needs to be able to connect externally
|
|
|
|
# over websocket for subscribeRepos
|
|
|
|
network:
|
|
|
|
instance_ip_mode: external
|
2023-09-05 19:06:07 +00:00
|
|
|
|
2023-09-29 18:41:19 +00:00
|
|
|
env_variables:
|
|
|
|
PDS_HOST: fed.brid.gy
|
|
|
|
|
|
|
|
# sandbox
|
|
|
|
PLC_HOST: plc.bsky-sandbox.dev
|
|
|
|
APPVIEW_HOST: api.bsky-sandbox.dev
|
|
|
|
BGS_HOST: bgs.bsky-sandbox.dev
|
|
|
|
|
|
|
|
# prod
|
|
|
|
# PLC_HOST: plc.directory
|
|
|
|
# APPVIEW_HOST: api.bsky.app
|
2023-10-05 17:29:48 +00:00
|
|
|
# BGS_HOST: bsky.network
|
2023-09-29 18:41:19 +00:00
|
|
|
|
2023-09-05 19:06:07 +00:00
|
|
|
# need only one instance so that new commits can be delivered to subscribeRepos
|
|
|
|
# subscribers in memory
|
|
|
|
manual_scaling:
|
|
|
|
instances: 1
|
|
|
|
|
|
|
|
# https://cloud.google.com/appengine/docs/flexible/python/runtime#application_startup
|
|
|
|
# https://docs.gunicorn.org/en/latest/settings.html#timeout
|
|
|
|
# TODO: try asyncio w/eventlet workers
|
|
|
|
entrypoint: gunicorn --workers 1 --threads 20 -b :$PORT hub:app
|