mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	Cleaned up bridgy fed
This commit is contained in:
		| @@ -1,20 +0,0 @@ | ||||
| # Administration | ||||
|  | ||||
| ## Local dev shell (inside container) | ||||
| ```bash | ||||
| docker compose exec application bash | ||||
| ``` | ||||
|  | ||||
| ## Logs | ||||
| ```bash | ||||
| docker compose logs -f application | ||||
| docker compose logs -f emulator   # if enabled | ||||
| ``` | ||||
|  | ||||
| ## Notes | ||||
| - Upstream dev run example: | ||||
|   ```bash | ||||
|   export APPVIEW_HOST=api.bsky.app PLC_HOST=plc.directory BGS_HOST=bsky.network PDS_HOST=atproto.brid.gy | ||||
|   flask --debug run -p 8080 | ||||
|   ``` | ||||
|   (We run via gunicorn in this role.) | ||||
| @@ -6,38 +6,15 @@ | ||||
|       dockerfile: Dockerfile | ||||
|       args: | ||||
|         BRIDGY_REPO_URL: "{{ BRIDGY_REPO_URL }}" | ||||
|         BRIDGY_REPO_REF: "{{ BRIDGY_REPO_REF }}" | ||||
|         BRIDGY_REPO_BRANCH: "{{ BRIDGY_REPO_BRANCH }}" | ||||
|         CONTAINER_PORT:  "{{ container_port | string }}" | ||||
|     image: "{{ BRIDGY_IMAGE }}" | ||||
|     image: "{{ BRIDGY_IMAGE }}:{{ BRIDGY_VERSION }}" | ||||
|     container_name: "{{ BRIDGY_CONTAINER }}" | ||||
|     hostname: "{{ container_hostname }}" | ||||
|     env_file: | ||||
|       - "{{ docker_compose.files.env }}" | ||||
|     ports: | ||||
|       - "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}" | ||||
|       - "127.0.0.1:{{ http_port }}:{{ container_port }}" | ||||
| {% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %} | ||||
| {% include 'roles/docker-container/templates/base.yml.j2' %} | ||||
|     depends_on: | ||||
| {% if EMULATOR_ENABLED | bool %} | ||||
|       - emulator | ||||
| {% endif %} | ||||
| {% include 'roles/docker-container/templates/networks.yml.j2' %} | ||||
|  | ||||
| {% if EMULATOR_ENABLED | bool %} | ||||
|   emulator: | ||||
|     image: "{{ EMULATOR_IMAGE }}" | ||||
|     container_name: "{{ BRIDGY_CONTAINER }}_emulator" | ||||
|     command: > | ||||
|       gcloud emulators firestore start | ||||
|       --host-port=0.0.0.0:{{ EMULATOR_PORT }} | ||||
|       --database-mode=datastore-mode | ||||
|       --quiet | ||||
|     ports: | ||||
|       - "127.0.0.1:{{ EMULATOR_PORT }}:{{ EMULATOR_PORT }}" | ||||
|     environment: | ||||
|       - CLOUDSDK_CORE_DISABLE_PROMPTS=1 | ||||
|     restart: unless-stopped | ||||
| {% include 'roles/docker-container/templates/networks.yml.j2' %} | ||||
| {% endif %} | ||||
|  | ||||
| {% include 'roles/docker-compose/templates/networks.yml.j2' %} | ||||
|   | ||||
| @@ -1,18 +1,13 @@ | ||||
| # Flask / Gunicorn basics | ||||
| FLASK_ENV="{{ ENVIRONMENT | default('production') }}" | ||||
| FLASK_ENV="{{ ENVIRONMENT }}" | ||||
| PORT="{{ container_port }}" | ||||
| BRIDGY_ADMIN_EMAIL="{{ BRIDGY_ADMIN_EMAIL }}" | ||||
|  | ||||
| # Bridgy Fed upstream knobs (see README @ GitHub) | ||||
| APPVIEW_HOST="{{ APPVIEW_HOST }}" | ||||
| PLC_HOST="{{ PLC_HOST }}" | ||||
| BGS_HOST="{{ BGS_HOST }}" | ||||
| PDS_HOST="{{ PDS_HOST }}" | ||||
|  | ||||
| # Datastore emulator (Datastore-mode Firestore). If sidecar enabled, point here. | ||||
| GOOGLE_CLOUD_PROJECT="{{ EMULATOR_PROJECT_ID }}" | ||||
| DATASTORE_EMULATOR_HOST="{{ EMULATOR_ENABLED | ternary(EMULATOR_HOST_INTERNAL, '') }}" | ||||
| # DATASTORE_DATASET not needed when GOOGLE_CLOUD_PROJECT is set | ||||
| BRIDGY_APPVIEW_HOST="{{ BRIDGY_APPVIEW_HOST }}" | ||||
| BRIDGY_PLC_HOST="{{ BRIDGY_PLC_HOST }}" | ||||
| BRIDGY_BGS_HOST="{{ BRIDGY_BGS_HOST }}" | ||||
| BRIDGY_PDS_HOST="{{ BRIDGY_PDS_HOST }}" | ||||
|  | ||||
| # Optional: | ||||
| # GUNICORN_CMD_ARGS="--log-level info" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user