1.5 KiB
AI Share Thin Proxy
This compose stack runs only nginx and forwards an external hostname/path to an existing AI Share origin. It is intended for small servers where the browser-facing URL may be different from the origin URL.
The origin service should keep a stable internal mount, usually:
AISHARE_BASE_PATH=/aishare
The proxy can expose that same origin as any hostname/path because reader pages use relative links and the admin UI derives API/share URLs from the browser's current URL.
Prefix Proxy
Example: expose https://domain.com/services/aishare/ and forward to an origin mounted at /aishare.
cd proxy
cp .env.example .env
AISHARE_PROXY_BIND=127.0.0.1:8090
AISHARE_PROXY_SERVER_NAME=domain.com
AISHARE_PROXY_EXTERNAL_PATH=/services/aishare
AISHARE_UPSTREAM_ORIGIN=https://origin.example.com
AISHARE_UPSTREAM_PATH=/aishare
docker compose up -d
Point the server's edge nginx at http://127.0.0.1:8090.
Root Host Proxy
Example: expose https://aishare.domain.com/ and forward to an origin mounted at /aishare.
AISHARE_PROXY_BIND=127.0.0.1:8090
AISHARE_PROXY_SERVER_NAME=aishare.domain.com
AISHARE_PROXY_EXTERNAL_PATH=/
AISHARE_UPSTREAM_ORIGIN=https://origin.example.com
AISHARE_UPSTREAM_PATH=/aishare
Direct Serving
If this service is not behind a rewriting proxy, set the app mount directly:
AISHARE_BASE_PATH=/
or:
AISHARE_BASE_PATH=/services/aishare
Then route traffic to the AI Share container without path rewriting.