OCPP 프록시를 Docker로 통합

This commit is contained in:
root
2026-04-18 21:40:36 +09:00
parent 4558ac10c0
commit 93d7ae617c
3 changed files with 54 additions and 2 deletions

24
entrypoint-proxy.sh Executable file
View 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