···55##
66## Then visit http://localhost:8080
77##
88-## Configure instance-info.json to match your deployment:
99-## - Set "flavor" to "pds-operator" or "self-hosted"
1010-## - Set "operator" to your organization name
1111-## - Set "pds" to your PDS hostname (if applicable)
1212-## - Enable features as you deploy backend services
88+## Configure your instance via environment variables:
99+## INSTANCE_FLAVOR — public, pds-operator, or self-hosted
1010+## INSTANCE_OPERATOR — your organization name
1111+## INSTANCE_PDS — your PDS hostname
1212+## INSTANCE_FEATURES — comma-separated: sync,sharing,ai
1313+## INSTANCE_ACCESS_MODE — open or allowlist
1414+## INSTANCE_ALLOWLIST — comma-separated DIDs (when mode=allowlist)
1515+## INSTANCE_NOTICE — banner notice text
1616+##
1717+## Or mount a custom instance-info.json:
1818+## volumes:
1919+## - ./instance-info.json:/srv/instance-info.json:ro
13201421services:
1522 office:
1623 image: atcr.io/scottlanoue.com/atmosphere-office:latest
1724 ports:
1825 - "8080:8080"
1919- volumes:
2020- - ./instance-info.json:/srv/instance-info.json:ro
2626+ environment:
2727+ - INSTANCE_FLAVOR=self-hosted
2128 restart: unless-stopped
+46
docker-entrypoint.sh
···11+#!/bin/sh
22+set -e
33+44+# Generate /srv/instance-info.json from environment variables.
55+# If INSTANCE_FLAVOR is not set, the baked-in file from the build is used as-is.
66+77+if [ -n "$INSTANCE_FLAVOR" ]; then
88+ SYNC=false; SHARING=false; AI=false
99+ case ",$INSTANCE_FEATURES," in *,sync,*) SYNC=true;; esac
1010+ case ",$INSTANCE_FEATURES," in *,sharing,*) SHARING=true;; esac
1111+ case ",$INSTANCE_FEATURES," in *,ai,*) AI=true;; esac
1212+1313+ OP=null
1414+ [ -n "$INSTANCE_OPERATOR" ] && OP="\"$INSTANCE_OPERATOR\""
1515+1616+ PDS=null
1717+ [ -n "$INSTANCE_PDS" ] && PDS="\"$INSTANCE_PDS\""
1818+1919+ NOTICE=null
2020+ [ -n "$INSTANCE_NOTICE" ] && NOTICE="\"$INSTANCE_NOTICE\""
2121+2222+ AC=null
2323+ if [ "$INSTANCE_ACCESS_MODE" = "allowlist" ] && [ -n "$INSTANCE_ALLOWLIST" ]; then
2424+ DIDS=$(printf '%s' "$INSTANCE_ALLOWLIST" | sed 's/,/","/g')
2525+ AC="{\"mode\":\"allowlist\",\"allowlist\":[\"$DIDS\"]}"
2626+ elif [ "$INSTANCE_ACCESS_MODE" = "open" ]; then
2727+ AC="{\"mode\":\"open\"}"
2828+ fi
2929+3030+ cat > /srv/instance-info.json <<EOF
3131+{
3232+ "flavor": "$INSTANCE_FLAVOR",
3333+ "operator": $OP,
3434+ "pds": $PDS,
3535+ "features": {
3636+ "sync": $SYNC,
3737+ "sharing": $SHARING,
3838+ "ai": $AI
3939+ },
4040+ "notice": $NOTICE,
4141+ "accessControl": $AC
4242+}
4343+EOF
4444+fi
4545+4646+exec "$@"