refactor: move Docker build files to build/ directory
This commit is contained in:
52
build/docker-entrypoint.sh
Normal file
52
build/docker-entrypoint.sh
Normal file
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
# ###################################################################
|
||||
# docker-entrypoint.sh - FGTools 컨테이너 시작 스크립트
|
||||
# ###################################################################
|
||||
|
||||
set -e
|
||||
|
||||
# PYTHONPATH 설정
|
||||
export PYTHONPATH=/app:$PYTHONPATH
|
||||
|
||||
# 서비스별 실행
|
||||
case "$1" in
|
||||
dashboard)
|
||||
echo "[FGTools] Starting Dashboard API on port ${FLASK_PORT:-5000}..."
|
||||
exec gunicorn \
|
||||
--bind 0.0.0.0:${FLASK_PORT:-5000} \
|
||||
--workers ${GUNICORN_WORKERS:-2} \
|
||||
--timeout 120 \
|
||||
--access-logfile - \
|
||||
--error-logfile - \
|
||||
"apps.dashboard.app:create_app()"
|
||||
;;
|
||||
weather)
|
||||
echo "[FGTools] Starting Weather API on port ${FLASK_PORT:-5001}..."
|
||||
exec gunicorn \
|
||||
--bind 0.0.0.0:${FLASK_PORT:-5001} \
|
||||
--workers ${GUNICORN_WORKERS:-2} \
|
||||
--timeout 120 \
|
||||
--access-logfile - \
|
||||
--error-logfile - \
|
||||
"apps.weather_api.app:create_app()"
|
||||
;;
|
||||
webhook)
|
||||
echo "[FGTools] Starting Webhook Server on port ${FLASK_PORT:-5002}..."
|
||||
exec gunicorn \
|
||||
--bind 0.0.0.0:${FLASK_PORT:-5002} \
|
||||
--workers ${GUNICORN_WORKERS:-2} \
|
||||
--timeout 120 \
|
||||
--access-logfile - \
|
||||
--error-logfile - \
|
||||
"apps.webhook.app:create_app()"
|
||||
;;
|
||||
shell)
|
||||
echo "[FGTools] Starting interactive shell..."
|
||||
exec /bin/bash
|
||||
;;
|
||||
*)
|
||||
echo "[FGTools] Unknown service: $1"
|
||||
echo "Available services: dashboard, weather, webhook, shell"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user