This commit is contained in:
iCodex
2024-02-24 23:33:41 +08:00
commit 54755602e4
11 changed files with 348 additions and 0 deletions

20
docker/build/run_node.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env sh
ROOT_DIR='/usr/local/goedge'
function pre_config() {
if [ ! -e ${ROOT_DIR}/edge-node/configs/api_cluster.yaml ]; then
touch ${ROOT_DIR}/edge-node/configs/api_cluster.yaml
cat >> ${ROOT_DIR}/edge-node/configs/api_cluster.yaml << EOF
rpc.endpoints: [ "${ENDPOINTS}" ]
clusterId: "${CLUSTERID}"
secret: "${SECRET}"
EOF
fi
}
mkdir -p /opt/cache
chmod 777 /opt/cache
pre_config
${ROOT_DIR}/edge-node/bin/edge-node