test ou on demarre bien tout les services

This commit is contained in:
piair 2023-08-24 13:05:44 +02:00
parent 9810381f8d
commit 661c76b9f7
3 changed files with 10 additions and 10 deletions

View File

@ -16,4 +16,4 @@ RUN curl -sSLO https://piair.xyz/download/chrome.deb \
ENV TZ="Europe/Paris"
WORKDIR /app/MsRewards-Reborn/Flask/
CMD gunicorn --reload -w 4 -b 0.0.0.0:6666 'app:app'
CMD bash start.sh

View File

@ -1,8 +1,4 @@
red=`tput setaf 1`
green=`tput setaf 2`
blue=`tput setaf 4`
reset=`tput sgr0`
echo "${blue}setting up NGINX${reset}"
echo "\n\nsetting up NGINX\n\n"
rm /etc/nginx/sites-available/default
echo "
@ -39,18 +35,19 @@ server {
}
" >> /etc/nginx/sites-available/default
echo "${green}NGINX configuration successfull${reset}"
echo "\n\nNGINX configuration successfull\n\n"
service nginx restart
echo "${blue}creating sqlite databases${reset}"
echo "\n\ncreating sqlite databases\n\n"
sqlite3 /app/MsRewards-Reborn/MsRewards.db "CREATE TABLE daily (id INTEGER PRIMARY KEY,compte TEXT,points int,date TEXT);"
sqlite3 /app/MsRewards-Reborn/MsRewards.db "CREATE TABLE comptes (id INTEGER PRIMARY KEY,compte TEXT,last_pts int, banned int);"
echo "${blue}configurating grafana${reset}"
echo "\n\nconfigurating grafana\n\n"
cp /app/MsRewards-Reborn/grafana-config/grafana.ini /etc/grafana/
grafana-cli plugins install frser-sqlite-datasource
service grafana-server restart
service grafana-server stop
service grafana-server start
curl -X "POST" "http://localhost:3000/api/datasources" \
-H "Content-Type: application/json" \
--user admin:admin \

3
start.sh Normal file
View File

@ -0,0 +1,3 @@
service nginx start
service grafana-server start
gunicorn --reload -w 4 -b 0.0.0.0:6666 'app:app'