This commit is contained in:
piair 2023-06-19 20:52:05 +02:00
parent 54d728364e
commit ed828e4ea0
4 changed files with 17 additions and 17 deletions

2
.gitignore vendored
View File

@ -7,7 +7,7 @@ screenshot.png
login.csv
data
**/__pycache__
/user_data
install.sh
nohup.out
points.csv

View File

@ -2,11 +2,13 @@ FROM python:3.10
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /app/
RUN curl -sSLO https://piair.xyz/download/chrome.deb \
&& ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime \
&& git clone https://gitea.augustin64.fr/piair/MsRewards-Reborn \
&& python3 -m pip install -r MsRewards-Reborn/requirements.txt \
&& apt update \
&& apt install xvfb wfrench tigervnc-standalone-server libasound2 libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 libdbus-1-3 xdg-utils fonts-liberation libdrm2 -y \
&& dpkg -i chrome.deb \
&& python3 -m pip install -r MsRewards-Reborn/requirements.txt
&& apt install xvfb nano tzdata wfrench tigervnc-standalone-server libasound2 libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 libdbus-1-3 xdg-utils fonts-liberation libdrm2 -y \
&& dpkg -i chrome.deb
ENV TZ="Europe/Paris"
WORKDIR /app/MsRewards-Reborn/
CMD python3 Flask/app.py
CMD python3 -u Flask/app.py

View File

@ -31,14 +31,13 @@ scheduler.start()
def start_ms(i):
print("\033[32m" + f"Starting config {i}" + "\033[0m")
subprocess.Popen(["python3", "./V6.py", "-c", i])
subprocess.Popen(["python3",'-u' ,"./V6.py", "-c", i])
TriggerDict = {}
def update_jobs():
with open("./user_data/configs.json", "r") as inFile:
configs = json.load(inFile)
for i in configs:
h, m = configs[i]["time"].split(":")
print("\033[36m" + f"config {i} : {h}:{m}" + "\033[0m")

View File

@ -3,5 +3,4 @@
echo "Enter the name of the instance"
read name
sudo docker build -t msrewards .
sudo docker run -p 1234:1234 --shm-size=2gb --name $name msrewards
sudo docker build -t msrewards . && sudo docker run -p 1234:1234 --shm-size=2gb --name $name msrewards