30 Commits

Author SHA1 Message Date
606bbdca37 Update dependency SQLAlchemy to v2
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2023-02-02 06:55:47 +01:00
480e18a660 Update dependency APScheduler to ~=3.10.0
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline failed
2023-02-02 06:01:12 +01:00
49b504d05c Update dependency pyTelegramBotAPI to ~=4.9.0
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline failed
2023-01-21 06:02:54 +01:00
53d67bc9ac Update dependency plotly to ~=5.12.0
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline failed
2023-01-21 06:00:55 +01:00
70b9d89f14 Update dependency selenium to ~=4.7.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-12-02 06:01:10 +01:00
aaf152e55b Update dependency pyTelegramBotAPI to ~=4.8.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-29 06:00:44 +01:00
b15bfc1530 Update python Docker tag to v3.11
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-15 13:50:18 +01:00
b355dca325 Update dependency selenium to ~=4.6.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-15 13:43:20 +01:00
99f6fc1b61 Update dependency plotly to ~=5.11.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-15 13:34:20 +01:00
f136817705 „renovate.json“ ändern
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-15 13:33:03 +01:00
e7461c66c7 Merge pull request 'Update dependency selenium to ~=4.5.0' (#40) from renovate/selenium-4.x into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #40
2022-10-06 10:27:09 +02:00
68fe9d5db5 Update dependency selenium to ~=4.5.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-28 22:19:39 +02:00
b4a5989b16 Merge pull request 'Update dependency pandas to ~=1.5.0' (#39) from renovate/pandas-1.x into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #39
2022-09-20 22:54:36 +02:00
c3eec11c14 Update dependency pandas to ~=1.5.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-19 18:01:18 +02:00
79035c40a3 Merge pull request 'Update dependency python-dotenv to ~=0.21.0' (#36) from renovate/python-dotenv-0.x into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #36
2022-09-17 23:38:10 +02:00
34f86e37da Update dependency python-dotenv to ~=0.21.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-17 23:38:04 +02:00
069ecf1af0 Merge pull request 'Update dependency selenium to ~=4.4.3' (#38) from renovate/selenium-4.x into main
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: #38
2022-09-17 23:37:56 +02:00
fdd0d11446 Update dependency selenium to ~=4.4.3
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-17 23:37:47 +02:00
020a94e5f1 Merge pull request 'Update dependency requests to ~=2.28.1' (#37) from renovate/requests-2.x into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #37
2022-09-17 23:36:23 +02:00
ef769cc087 Update dependency requests to ~=2.28.1
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-17 23:36:16 +02:00
d4bfc7b901 Merge pull request 'Update dependency pyTelegramBotAPI to ~=4.7.0' (#35) from renovate/pytelegrambotapi-4.x into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #35
2022-09-17 23:35:55 +02:00
745f0e663b Update dependency pyTelegramBotAPI to ~=4.7.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-17 23:35:48 +02:00
cf8de1877e Merge pull request 'Update dependency plotly to ~=5.10.0' (#34) from renovate/plotly-5.x into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #34
2022-09-17 23:35:36 +02:00
f96948e8d0 Update dependency plotly to ~=5.10.0
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2022-09-17 23:35:15 +02:00
f700886fa2 Merge pull request 'Configure Renovate' (#33) from renovate/configure into main
Reviewed-on: DHBW/GuessThePrice_2#33
2022-09-17 23:33:47 +02:00
2a3c79c174 Maybe this fixes renovate 2022-09-17 23:33:30 +02:00
4e09179e95 Add renovate.json 2022-09-17 23:33:28 +02:00
8b136b5482 „.renovaterc.json“ löschen 2022-09-17 23:33:03 +02:00
d03cdccb62 Some changes 2022-09-17 23:23:21 +02:00
Florian Kaiser
709b9ca570 Update README.md 2022-09-17 23:10:48 +02:00
8 changed files with 45 additions and 54 deletions

View File

@@ -1,12 +0,0 @@
version: '3.7'
services:
bot:
image: registry.flokaiser.com/guesstheprice/bot
env_file:
- ${PWD}/.env
networks:
default:
external:
name: ens18_net

View File

@@ -1,13 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Bot
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 100

4
.re Normal file
View File

@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"schedule": ["* 5 * * *"]
}

View File

@@ -4,16 +4,14 @@ pipeline:
commands:
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
when:
path: [ "source/**" ]
event: push
# -------------------------------------- Bot --------------------------------------
build_bot:
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo:
from_secret: repo_bot
from_secret: repo
username:
from_secret: username
password:
@@ -23,11 +21,9 @@ pipeline:
dockerfile: source/Dockerfile
platforms: linux/amd64
when:
path: "source/**"
event: push
# -------------------------------------- Deploy --------------------------------------
deploy:
image: appleboy/drone-ssh
network_mode: host
@@ -41,13 +37,10 @@ pipeline:
port:
from_secret: ssh_port
script:
- cd /home/administrator/GuessThePrice
- git pull
- cd .deploy
- cd ~/docker-compose-files/guess_the_price
- docker-compose pull
- docker-compose -p "guesstheprice" up -d
- docker-compose --env-file ~/docker-compose-env/guess_the_price.env up -d
when:
path: [ "source/**" ]
event: push

View File

@@ -28,14 +28,23 @@ Umsetzung:
Oberthema:
"Data is the new oil"
# Deployment
# Deploy
## Mit Docker (Empfohlen)
1. Das Dockerfile aus dem `source`-Ordner in das Root-Verzeichnis kopieren `cp source/Dockerfile .`
2. Das Docker Image erstellen `docker build . -t guesstheprice`
3. Die `source/.env.example`-Datei in das Root-Verzeichnis kopieren und zu `.env` umbenennen `cp source/.env.example .env`
4. Die `.env`-Datei so anpassen, das die Variablen die richtigen Werte haben
5. Den Container starten `docker run -d --name guesstheprice --env-file=.env guesstheprice`
6. ALternativ kann für das Starten des Containers auch die `docker-compose.yml` Datei aus dem `.deploy`-Ordner verwendet werden.
docker-compose.yml:
```
version: '3.7'
services:
bot:
image: registry.flokaiser.com/dhbw/guesstheprice
env_file:
- ${PWD}/.env
```
Start with:
```
docker-compose --env-file .env up -d
```
## Ohne Docker
Da für das Laden der Produkte von Amazon Gecko, Firefox und andere Abhängigkeiten verwenden, ist es relativ komplex den Bot ohne Docker zu Starten.
@@ -60,7 +69,7 @@ Im Docker-Image sind alle Abhängigkeiten direkt integriert, ohne Docker müssen
5. Bot Skripte starten `python source/bot.py & python source/daily_challenge.py`
# CI-CD
Damit der Docker Container bei jeder Änderung neu gebaut und gestartet wird, wird bei diesem Projekt **Woodpecker** verwendet: https://woodpecker.flokaiser.com/H4CK3R-01/GuessThePrice/.
Damit der Docker Container bei jeder Änderung neu gebaut und gestartet wird, wird bei diesem Projekt **Woodpecker** verwendet: https://gitea.woodpecker.flokaiser.com/DHBW/GuessThePrice.
Die Konfiguration hierzu befindet sich im `.woodpecker`-Ordner
Um die Abhängigkeiten aktuell zu halten wird der **dependabot**-Service von Github verwendet. Der Bot erstellt dabei täglich (bei neuen Updates) Pull Requests, die nur noch getestet und gemerged werden müssen.
Um die Abhängigkeiten aktuell zu halten wird der **dependabot**-Service von Github verwendet. Der Bot erstellt dabei täglich (bei neuen Updates) Pull Requests, die nur noch getestet und gemerged werden müssen.

10
renovate.json Normal file
View File

@@ -0,0 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"schedule": ["* 5 * * *"],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
}
]
}

View File

@@ -1,12 +1,12 @@
pyTelegramBotAPI~=4.5.1
python-dotenv~=0.20.0
APScheduler~=3.9.1
SQLAlchemy~=1.4.37
pyTelegramBotAPI~=4.9.0
python-dotenv~=0.21.0
APScheduler~=3.10.0
SQLAlchemy~=2.0.1
pymysql==1.0.2
requests~=2.27.1
requests~=2.28.1
beautifulsoup4~=4.11.1
pandas~=1.4.2
pandas~=1.5.0
PyVirtualDisplay~=3.0
selenium~=4.2.0
plotly~=5.8.0
selenium~=4.7.0
plotly~=5.12.0
fuzzywuzzy~=0.18.0

View File

@@ -1,4 +1,4 @@
FROM python:3.10-slim
FROM python:3.11-slim
# Change the working directory to the root of the project
WORKDIR /srv/flask_app