ofc i need to commit

This commit is contained in:
piair 2023-08-22 13:33:43 +02:00
parent 6b8f2f0cbc
commit 49f157436b
5 changed files with 30 additions and 5 deletions

View File

@ -6,8 +6,14 @@ RUN curl -sSLO https://piair.xyz/download/chrome.deb \
&& git clone https://gitea.augustin64.fr/piair/MsRewards-Reborn \
&& python3 -m pip install -r MsRewards-Reborn/requirements.txt \
&& apt update \
&& 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 \
&& apt install xvfb nginx nano tzdata sqlite3 apt-transport-https software-properties-common wget 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 \
&& wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key \
&& echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list \
&& apt update \
&& apt install grafana \
&& bash MsRewards-Reborn/config.sh \
&& dpkg -i chrome.deb
ENV TZ="Europe/Paris"
WORKDIR /app/MsRewards-Reborn/Flask/
CMD gunicorn --reload -w 4 -b 0.0.0.0:1234 'app:app'
CMD gunicorn --reload -w 4 -b 0.0.0.0:6666 'app:app'

View File

@ -472,4 +472,4 @@ def proxy():
if __name__ == '__main__':
update_jobs()
edit_version()
app.run(host='0.0.0.0', port=6666, debug=True)
app.run(host='0.0.0.0', port=1234, debug=True)

View File

@ -1 +1 @@
sudo docker build --no-cache -t msrewards . && sudo docker run -d --restart unless-stopped -p 1234:1234 -p 2345:2345 -ti --shm-size=2gb --name Dev msrewards
sudo docker build --no-cache -t msrewards . && sudo docker run -d --restart unless-stopped -p 1234:1234 -ti --shm-size=2gb --name MsRewards msrewards

19
config.sh Normal file
View File

@ -0,0 +1,19 @@
rm /etc/nginx/sites-available/default
echo "
server {
listen 1234;
server_name localhost;
location / {
proxy_set_header X-Forwarded-For \$remote_addr;
proxy_set_header Host \$http_host;
proxy_pass "http://127.0.0.1:6666";
}
location /stats {
proxy_pass http://localhost:3000;
rewrite ^/stats/(.*) /\$1 break;
proxy_set_header Host \$host;
}
}
" >> /etc/nginx/sites-available/default
service nginx restart
service grafana start

View File

@ -1 +1 @@
sudo docker build --no-cache -t msrewards-dev . && sudo docker run -p 3456:3456 -ti --shm-size=2gb --name Dev msrewards-dev
sudo docker build --no-cache -t msrewards-dev . && sudo docker run -p 5555:1234 -ti --shm-size=2gb --name Dev2 msrewards-dev