diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c38f1f9 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/gitlab-ci.yml b/gitlab-ci.yml new file mode 100644 index 0000000..431ac5e --- /dev/null +++ b/gitlab-ci.yml @@ -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 \ No newline at end of file diff --git a/main.py b/main.py index a857929..40cae0b 100644 --- a/main.py +++ b/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...") diff --git a/requirements.txt b/requirements.txt index e69de29..6563100 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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