Merge pull request #3477 from router-for-me/cluster
Add cluster-specific docker-compose configuration for CLIProxyAPI
This commit is contained in:
@@ -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://<home-host>:8327/v0/management/certificates/clients" -H "X-MANAGEMENT-KEY: <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
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user