diff --git a/.env.cluster.example b/.env.cluster.example new file mode 100644 index 000000000..b062db8ac --- /dev/null +++ b/.env.cluster.example @@ -0,0 +1,5 @@ +# Cluster JWT example. +# After deploying https://github.com/router-for-me/CLIProxyAPIHome, get the JWT value with: +# curl -sS -X POST "http://:8327/v0/management/certificates/clients" -H "X-MANAGEMENT-KEY: " | jq -r '.home_jwt' +# Then paste it into HOME_JWT here or export it before starting Compose. +HOME_JWT=your-home-jwt-here diff --git a/docker-compose.cluster.yml b/docker-compose.cluster.yml new file mode 100644 index 000000000..540f98d74 --- /dev/null +++ b/docker-compose.cluster.yml @@ -0,0 +1,29 @@ +services: + cli-proxy-api: + image: ${CLI_PROXY_IMAGE:-eceasy/cli-proxy-api:latest} + pull_policy: always + build: + context: . + dockerfile: Dockerfile + args: + VERSION: ${VERSION:-dev} + COMMIT: ${COMMIT:-none} + BUILD_DATE: ${BUILD_DATE:-unknown} + container_name: cli-proxy-api-cluster + environment: + HOME_JWT: ${HOME_JWT:-} + ports: + - "8317:8317" + volumes: + - ./home:/root/.cli-proxy-api + - ./logs:/CLIProxyAPI/logs + command: > + sh -eu -c ' + if [ -z "$$HOME_JWT" ]; then + echo "HOME_JWT is required" >&2 + exit 1 + fi + + exec ./CLIProxyAPI -home-jwt "$$HOME_JWT" + ' + restart: unless-stopped \ No newline at end of file