OCPP 프록시를 Docker로 통합
This commit is contained in:
24
entrypoint-proxy.sh
Executable file
24
entrypoint-proxy.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 설정 파일을 영구 볼륨에서 관리
|
||||
CONFIG_DIR=/code/config
|
||||
|
||||
# proxy_config.json 심링크
|
||||
if [ -f "$CONFIG_DIR/proxy_config.json" ]; then
|
||||
ln -sf $CONFIG_DIR/proxy_config.json /code/proxy_config.json
|
||||
else
|
||||
touch /code/proxy_config.json
|
||||
cp /code/proxy_config.json $CONFIG_DIR/proxy_config.json 2>/dev/null || true
|
||||
ln -sf $CONFIG_DIR/proxy_config.json /code/proxy_config.json
|
||||
fi
|
||||
|
||||
# proxy_users.json 심링크
|
||||
if [ -f "$CONFIG_DIR/proxy_users.json" ]; then
|
||||
ln -sf $CONFIG_DIR/proxy_users.json /code/proxy_users.json
|
||||
else
|
||||
touch /code/proxy_users.json
|
||||
cp /code/proxy_users.json $CONFIG_DIR/proxy_users.json 2>/dev/null || true
|
||||
ln -sf $CONFIG_DIR/proxy_users.json /code/proxy_users.json
|
||||
fi
|
||||
|
||||
exec python3 ocpp_proxy_server.py
|
||||
Reference in New Issue
Block a user