Compare commits
3 Commits
60a1426a23
...
7f37402561
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f37402561 | |||
| 6203917ac0 | |||
| 21de32a568 |
+2
-1
@@ -7,7 +7,8 @@ __pycache__/
|
||||
*.py[cod]
|
||||
.venv/
|
||||
|
||||
# IDE
|
||||
# IDE / 에디터
|
||||
.vscode/
|
||||
.idea/
|
||||
.claude/
|
||||
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ services:
|
||||
container_name: dbx-main
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# NPM이 192.168.0.194:80 으로 프록시 → 컨테이너 8000으로 전달
|
||||
- "80:8000"
|
||||
# NPM이 192.168.0.194:8000 으로 프록시 → 컨테이너 8000으로 전달
|
||||
- "8000:8000"
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
@echo off
|
||||
cd /d "%~dp0"
|
||||
|
||||
echo.
|
||||
echo [1/2] Checking for sensitive files...
|
||||
echo.
|
||||
|
||||
set FOUND=0
|
||||
|
||||
:: git? ??? ??(tracked)?? ?? ?? ??
|
||||
for %%F in (
|
||||
.env
|
||||
.env.local
|
||||
.env.production
|
||||
.env.secret
|
||||
) do (
|
||||
git ls-files --error-unmatch "%%F" >nul 2>&1
|
||||
if not errorlevel 1 (
|
||||
echo [ERROR] Sensitive file is tracked by git: %%F
|
||||
set FOUND=1
|
||||
)
|
||||
)
|
||||
|
||||
:: ??? ?? ?? ??? git? ????? ??
|
||||
for %%P in (
|
||||
*.pem *.key *.p12 *.pfx id_rsa id_ed25519
|
||||
*secret* *password* *credential* *token* *apikey* *api_key*
|
||||
db.conf database.conf
|
||||
) do (
|
||||
git ls-files "%%P" 2>nul | findstr /r "." >nul 2>&1
|
||||
if not errorlevel 1 (
|
||||
echo [ERROR] Sensitive file pattern tracked by git: %%P
|
||||
set FOUND=1
|
||||
)
|
||||
)
|
||||
|
||||
if %FOUND%==1 (
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo PUSH BLOCKED: Sensitive file found in git.
|
||||
echo.
|
||||
echo Remove it with:
|
||||
echo git rm --cached ^<filename^>
|
||||
echo git commit -m "remove sensitive file"
|
||||
echo.
|
||||
echo Then add it to .gitignore to prevent future accidents.
|
||||
echo ============================================================
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo No sensitive files detected. Safe to push.
|
||||
echo.
|
||||
|
||||
echo [2/2] Pushing to Gitea...
|
||||
echo https://gitea.no1king.freeddns.org/king/dbx-main.git
|
||||
echo.
|
||||
|
||||
git push -u origin master
|
||||
|
||||
if %errorlevel%==0 (
|
||||
echo.
|
||||
echo [OK] Push complete.
|
||||
echo https://gitea.no1king.freeddns.org/king/dbx-main
|
||||
echo.
|
||||
) else (
|
||||
echo.
|
||||
echo [ERROR] Push failed. Check your credentials or network.
|
||||
echo.
|
||||
)
|
||||
pause
|
||||
Reference in New Issue
Block a user