mirror of
https://gitlab.dit.htwk-leipzig.de/fsr-im/tools/flatscraper.git
synced 2025-07-15 19:18:49 +02:00
add Dockerfile and CI configuration for building and pushing Docker image
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
# load python base image
|
||||
FROM python:3.12.0-slim
|
||||
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . /app
|
||||
|
||||
CMD ["python", "-u", "/app/main.py"]
|
20
gitlab-ci.yml
Normal file
20
gitlab-ci.yml
Normal file
@ -0,0 +1,20 @@
|
||||
# Build Python Docker image and save it to GitLab Container Registry
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: docker:latest
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
only:
|
||||
- main
|
||||
- development
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
3
main.py
3
main.py
@ -24,7 +24,8 @@ def main():
|
||||
print("No known properties file found. Starting fresh.")
|
||||
|
||||
while True:
|
||||
print("Scraping properties...")
|
||||
current_time = time.strftime("%H:%M:%S", time.localtime())
|
||||
print("Scraping properties at " + current_time)
|
||||
print("Scraping properties from Wogetra...")
|
||||
properties = wogetra_scraper.scrape_wogetra()
|
||||
print("Scraping properties from LWB...")
|
||||
|
@ -0,0 +1,59 @@
|
||||
aiohappyeyeballs==2.4.4
|
||||
aiohttp==3.11.11
|
||||
aiosignal==1.3.2
|
||||
asttokens==3.0.0
|
||||
async-timeout==5.0.1
|
||||
attrs==24.3.0
|
||||
backcall==0.2.0
|
||||
beautifulsoup4==4.12.3
|
||||
bleach==6.2.0
|
||||
certifi==2024.12.14
|
||||
charset-normalizer==3.4.1
|
||||
colorama==0.4.6
|
||||
decorator==5.1.1
|
||||
defusedxml==0.7.1
|
||||
discord.py==2.4.0
|
||||
docopt==0.6.2
|
||||
executing==2.1.0
|
||||
fastjsonschema==2.21.1
|
||||
frozenlist==1.5.0
|
||||
idna==3.10
|
||||
ipython==8.12.3
|
||||
jedi==0.19.2
|
||||
Jinja2==3.1.5
|
||||
jsonschema==4.23.0
|
||||
jsonschema-specifications==2024.10.1
|
||||
MarkupSafe==3.0.2
|
||||
matplotlib-inline==0.1.7
|
||||
mistune==3.1.0
|
||||
multidict==6.1.0
|
||||
nbclient==0.10.2
|
||||
nbconvert==7.16.5
|
||||
nbformat==5.10.4
|
||||
packaging==24.2
|
||||
pandocfilters==1.5.1
|
||||
parso==0.8.4
|
||||
pickleshare==0.7.5
|
||||
platformdirs==4.3.6
|
||||
prompt_toolkit==3.0.48
|
||||
propcache==0.2.1
|
||||
pure_eval==0.2.3
|
||||
Pygments==2.19.1
|
||||
python-dateutil==2.9.0.post0
|
||||
pyzmq==26.2.0
|
||||
referencing==0.35.1
|
||||
requests==2.32.3
|
||||
rpds-py==0.22.3
|
||||
schedule==1.2.2
|
||||
six==1.17.0
|
||||
soupsieve==2.6
|
||||
stack-data==0.6.3
|
||||
tinycss2==1.4.0
|
||||
tornado==6.4.2
|
||||
traitlets==5.14.3
|
||||
typing_extensions==4.12.2
|
||||
urllib3==2.3.0
|
||||
wcwidth==0.2.13
|
||||
webencodings==0.5.1
|
||||
yarg==0.1.9
|
||||
yarl==1.18.3
|
||||
|
Reference in New Issue
Block a user