Skip to content

Commit 21fad9d

Browse files
authored
Merge pull request router-for-me#3477 from router-for-me/cluster
Add cluster-specific docker-compose configuration for CLIProxyAPI
2 parents 48a1c88 + 7efc162 commit 21fad9d

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.env.cluster.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Cluster JWT example.
2+
# After deploying https://github.com/router-for-me/CLIProxyAPIHome, get the JWT value with:
3+
# curl -sS -X POST "http://<home-host>:8327/v0/management/certificates/clients" -H "X-MANAGEMENT-KEY: <management-key>" | jq -r '.home_jwt'
4+
# Then paste it into HOME_JWT here or export it before starting Compose.
5+
HOME_JWT=your-home-jwt-here

docker-compose.cluster.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
services:
2+
cli-proxy-api:
3+
image: ${CLI_PROXY_IMAGE:-eceasy/cli-proxy-api:latest}
4+
pull_policy: always
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
args:
9+
VERSION: ${VERSION:-dev}
10+
COMMIT: ${COMMIT:-none}
11+
BUILD_DATE: ${BUILD_DATE:-unknown}
12+
container_name: cli-proxy-api-cluster
13+
environment:
14+
HOME_JWT: ${HOME_JWT:-}
15+
ports:
16+
- "8317:8317"
17+
volumes:
18+
- ./home:/root/.cli-proxy-api
19+
- ./logs:/CLIProxyAPI/logs
20+
command: >
21+
sh -eu -c '
22+
if [ -z "$$HOME_JWT" ]; then
23+
echo "HOME_JWT is required" >&2
24+
exit 1
25+
fi
26+
27+
exec ./CLIProxyAPI -home-jwt "$$HOME_JWT"
28+
'
29+
restart: unless-stopped

0 commit comments

Comments
 (0)