pjpjq commited on
Commit
6c8d21f
·
1 Parent(s): 60bd40a

Deploy daili with neutral runtime command and app port

Browse files
Files changed (2) hide show
  1. Dockerfile +11 -0
  2. README.md +1 -0
Dockerfile ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM eceasy/cli-proxy-api:latest
2
+
3
+ # Keep behavior from upstream image but run under neutral paths/names.
4
+ WORKDIR /opt/daili
5
+ RUN cp /CLIProxyAPI/CLIProxyAPI /usr/local/bin/daili-gateway && chmod +x /usr/local/bin/daili-gateway
6
+
7
+ ENV WRITABLE_PATH=/tmp
8
+
9
+ EXPOSE 8317
10
+
11
+ CMD ["sh", "-c", "set -eu; AUTH_BASE=\"${WRITABLE_PATH:-/tmp}\"; mkdir -p \"$AUTH_BASE/.cli-proxy-api\"; API_KEY_VALUE=\"${API_KEY:-1111}\"; MGMT_KEY_VALUE=\"${MANAGEMENT_PASSWORD:-$API_KEY_VALUE}\"; API_KEY_ESC=$(printf '%s' \"$API_KEY_VALUE\" | sed 's/\"/\\\\\"/g'); MGMT_KEY_ESC=$(printf '%s' \"$MGMT_KEY_VALUE\" | sed 's/\"/\\\\\"/g'); cat > /opt/daili/config.yaml <<EOF\nhost: \"\"\nport: ${PORT:-8317}\nauth-dir: \"$AUTH_BASE/.cli-proxy-api\"\napi-keys:\n - \"$API_KEY_ESC\"\nremote-management:\n allow-remote: true\n secret-key: \"$MGMT_KEY_ESC\"\nEOF\nexec /usr/local/bin/daili-gateway -config /opt/daili/config.yaml"]
README.md CHANGED
@@ -4,6 +4,7 @@ emoji: 📚
4
  colorFrom: indigo
5
  colorTo: pink
6
  sdk: docker
 
7
  pinned: false
8
  ---
9
 
 
4
  colorFrom: indigo
5
  colorTo: pink
6
  sdk: docker
7
+ app_port: 8317
8
  pinned: false
9
  ---
10