Compare commits

..

No commits in common. "35efd063c24cbf26268d88b1e2975b899835639a" and "77ac4dca597c4e92ae60660f260151e4038c6384" have entirely different histories.

5 changed files with 6 additions and 20 deletions

View File

@ -1,10 +1,8 @@
FROM python:3.9.20-slim-bookworm
RUN pip install python-dotenv flask
RUN apt-get update && apt-get install -y curl && apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY api.py tx.sh .
RUN chmod +x tx.sh api.py
CMD ./api.py
CMD python /app/api.py

View File

@ -7,4 +7,4 @@ COPY keepalive.sh .
RUN chmod +x keepalive.sh
CMD ./keepalive.sh
CMD /app/keepalive.sh

5
api.py Executable file → Normal file
View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from flask import Flask, request, jsonify
import subprocess
import json
@ -75,5 +73,4 @@ def verify_payment():
if __name__ == '__main__':
debug_mode = os.getenv('APP_DEBUG', 'False').lower() in ('true', '1', 't')
port = int(os.getenv('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=debug_mode)
app.run(debug=debug_mode)

View File

@ -1,9 +0,0 @@
services:
keepalive:
env_file: .env
image: git.shihaam.dev/shihaam/mib-payment-verify/keepalive
api:
env_file: .env
image: git.shihaam.dev/shihaam/mib-payment-verify/api
ports:
- 5000:5000

View File

@ -2,9 +2,9 @@
while true; do
source .env 2> /dev/null
KEEP_ALIVE=$(curl -s 'https://faisanet.mib.com.mv/aProfile/keepAlive' \
curl 'https://faisanet.mib.com.mv/aProfile/keepAlive' \
-X 'POST' \
-H "cookie: prefTheme=1; ql_0=${QL_0}; IBSID=${IBSID}; dashboardStatsMode=1; _zwaf_ua=Brave; time-tracker=600")
echo $KEEP_ALIVE
-H "cookie: prefTheme=1; ql_0=${QL_0}; IBSID=${IBSID}; dashboardStatsMode=1; _zwaf_ua=Brave; time-tracker=600"
sleep 30
done