Files
ev-charging-backend/entrypoint-proxy.sh
2026-04-18 21:40:36 +09:00

25 lines
773 B
Bash
Executable File

#!/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