mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 11:47:14 +02:00
web-app-bluesky: refactor role, add Cloudflare DNS integration, split tasks
Changes: add AppView port; add CSP whitelist; new tasks (01_pds, 02_social_app, 03_dns); switch templates to BLUESKY_* vars; update docker-compose and env; TCP healthcheck; remove admin_password from schema. Conversation context: https://chatgpt.com/share/68b85276-e0ec-800f-90ec-480a1d528593
This commit is contained in:
@@ -3,40 +3,32 @@
|
||||
pds:
|
||||
{% set container_port = 3000 %}
|
||||
{% set container_healthcheck = 'xrpc/_health' %}
|
||||
image: "{{ applications | get_app_conf(application_id, 'images.pds', True) }}"
|
||||
image: "{{ BLUESKY_PDS_IMAGE }}:{{ BLUESKY_PDS_VERSION }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- pds_data:/opt/pds
|
||||
- {{pdsadmin_file_path}}:/usr/local/bin/pdsadmin:ro
|
||||
- pds_data:{{ BLUESKY_PDS_DATA_DIR }}
|
||||
- {{ BLUESKY_PDSADMIN_FILE }}:/usr/local/bin/pdsadmin:ro
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http['web-app-bluesky_api']}}:{{ container_port }}"
|
||||
- "127.0.0.1:{{ BLUESKY_API_PORT }}:{{ container_port }}"
|
||||
|
||||
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
# Deactivated for the moment @see https://github.com/bluesky-social/social-app
|
||||
{% if BLUESKY_WEB_ENABLED %}
|
||||
{% set container_port = 8100 %}
|
||||
web:
|
||||
command: ["bskyweb","serve"]
|
||||
build:
|
||||
context: "{{ social_app_path }}"
|
||||
dockerfile: Dockerfile
|
||||
# It doesn't compile yet with this parameters. @todo Fix it
|
||||
args:
|
||||
REACT_APP_PDS_URL: "{{ WEB_PROTOCOL }}://{{domains[application_id].api}}" # URL des PDS
|
||||
REACT_APP_API_URL: "{{ WEB_PROTOCOL }}://{{domains[application_id].api}}" # API-URL des PDS
|
||||
REACT_APP_SITE_NAME: "{{ PRIMARY_DOMAIN | upper }} - Bluesky"
|
||||
REACT_APP_SITE_DESCRIPTION: "Decentral Social "
|
||||
context: "{{ BLUESKY_SOCIAL_APP_DIR }}"
|
||||
dockerfile: Dockerfile
|
||||
pull_policy: never
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http['web-app-bluesky_web']}}:8100"
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-c", "for pid in $(ls /proc | grep -E '^[0-9]+$'); do if cat /proc/$pid/cmdline 2>/dev/null | grep -q 'bskywebserve'; then exit 0; fi; done; exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
- "127.0.0.1:{{ BLUESKY_WEB_PORT }}:{{ container_port }}"
|
||||
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
pds_data:
|
||||
|
||||
name: {{ BLUESKY_PDS_DATA_VOLUME }}
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
Reference in New Issue
Block a user