lots of stuff. It now runs in the cloud yay!
Some checks failed
Build and Push Docker Images / build (push) Failing after 11s

This commit is contained in:
Christian 2024-06-07 08:46:20 +00:00
parent a38aa4cd83
commit bc67482b24
11 changed files with 213 additions and 217 deletions

Binary file not shown.

View File

View File

@ -1,17 +0,0 @@
# Use the official Python image from the Docker Hub
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install the required Python packages
RUN pip install -r requirements.txt
# Expose port 5000 to the outside world
EXPOSE 5000
# Command to run the app using Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]

Binary file not shown.

View File

@ -1,28 +0,0 @@
version: "3.8"
services:
api:
image: gitea.rannes.dev/rannes.dev/sw-jobs-api:latest
networks:
- traefik-proxy
ports:
- "3600:5000"
volumes:
- /appdata/sw-jobs/scrapers:/app/scrapers
environment:
- FLASK_ENV=production
labels:
- traefik.enable=true
- traefik.http.routers.swJobsRouter.rule=Host(`api.rannes.dev`)
- traefik.http.routers.swJobsRouter.tls=true
- traefik.http.routers.swJobsRouter.entryPoints=https
- traefik.http.routers.swJobsRouter.middlewares=crowdsec-bouncer@docker
scraper:
image: gitea.rannes.dev/rannes.dev/sw-jobs-scraper:latest
volumes:
- /appdata/sw-jobs/scrapers:/app
networks:
traefik-proxy:
external: true

Binary file not shown.

View File

@ -1,29 +0,0 @@
# Use the official Python image from the Docker Hub
FROM python:3.12-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the script and requirements.txt into the container at /app
COPY jobindex.py .
COPY requirements.txt .
# Install the required Python packages
RUN pip install -r requirements.txt
# Install cron and create log file
RUN apt-get update \
&& apt-get -y install cron \
&& touch /var/log/cron.log
# Copy the cron job file into the cron directory
COPY cronjob /etc/cron.d/jobindex-cron
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/jobindex-cron
# Apply cron job
RUN crontab /etc/cron.d/jobindex-cron
# Run the command on container startup
CMD ["cron", "-f"]

View File

@ -1,2 +1,2 @@
# Run the jobindex.py script every hour # Run the jobindex.py script every hour
0 * * * * python /app/jobindex.py >> /var/log/cron.log 2>&1 0 * * * * python ~/sw-jobs-1/scrapers/jobindex.py >> /var/log/cron.log 2>&1

View File

@ -8,7 +8,7 @@ from datetime import datetime, timedelta
base_url = 'https://www.jobindex.dk/jobsoegning/it/' base_url = 'https://www.jobindex.dk/jobsoegning/it/'
# Keywords to include in the job listings # Keywords to include in the job listings
include_keywords = ['software', 'nextjs', 'svelte'] include_keywords = ['nextjs', 'svelte', 'react']
# Keywords to exclude from the job titles # Keywords to exclude from the job titles
exclude_keywords = ['senior'] exclude_keywords = ['senior']

View File

@ -138,5 +138,75 @@
"location": "Herlev", "location": "Herlev",
"date_posted": "2024-05-27", "date_posted": "2024-05-27",
"link": "https://www.fisker-it.dk/job-systems-engineer" "link": "https://www.fisker-it.dk/job-systems-engineer"
},
{
"id": "Software Engineers (java) for the Combat & Self Protection-http://www.terma.com/-S\u00f8borg-2024-06-06",
"title": "Software Engineers (java) for the Combat & Self Protection",
"url": "http://www.terma.com/",
"img": "https://www.jobindex.dk/img/logo/terma_logo2012.gif",
"company": "Terma A/S",
"location": "S\u00f8borg",
"date_posted": "2024-06-06",
"link": "https://termaas.hr-on.com/show-job/202880&locale=da_DK"
},
{
"id": "Projektleder til softwareafdeling-https://www.envidan.dk/-Silkeborg-2024-06-06",
"title": "Projektleder til softwareafdeling",
"url": "https://www.envidan.dk/",
"img": "https://www.jobindex.dk/img/brand/Envidan_top_ny_030424_3.png",
"company": "EnviDan A/S",
"location": "Silkeborg",
"date_posted": "2024-06-06",
"link": "https://www.envidan.com/da/ledige-stillinger/projektleder-software/"
},
{
"id": "Unity Realtime and C# developer for Maritime Simulator software development team-https://forcetechnology.com/da/-Lyngby-2024-06-05",
"title": "Unity Realtime and C# developer for Maritime Simulator software development team",
"url": "https://forcetechnology.com/da/",
"img": "https://www.jobindex.dk/img/brand/spo-top-force-ingenior-223101.jpg",
"company": "FORCE Technology",
"location": "Lyngby",
"date_posted": "2024-06-05",
"link": "https://www.jobindex.dk/jobannonce/h1467736/unity-realtime-and-c-developer-for-maritime-simulator-software-development-team"
},
{
"id": "Lead Software Test Architect-https://www.grundfos.com/dk-Bjerringbro-2024-06-05",
"title": "Lead Software Test Architect",
"url": "https://www.grundfos.com/dk",
"img": "https://www.jobindex.dk/img/brand/20_spo_top_grundfos_20230802.jpg",
"company": "Grundfos A/S",
"location": "Bjerringbro",
"date_posted": "2024-06-05",
"link": "https://jobs.grundfos.com/job/Lead-Software-Test-Architect/69353-en_GB"
},
{
"id": "Operations Engineer-https://web.scalepoint.com/da/-Copenhagen-2024-06-05",
"title": "Operations Engineer",
"url": "https://web.scalepoint.com/da/",
"img": "https://www.jobindex.dk/img/brand/Jobindex_header_scalepoint.png",
"company": "Scalepoint Technologies Denmark A/S",
"location": "Copenhagen",
"date_posted": "2024-06-05",
"link": "https://scalepoint.jobs.personio.com/job/1493451?display=en"
},
{
"id": "IT-automatiseringskonsulent-http://www.dabank.dk/-Tjele-2024-06-04",
"title": "IT-automatiseringskonsulent",
"url": "http://www.dabank.dk/",
"img": "https://www.jobindex.dk/img/brand/DanskeAndelskassersBank_Bygning_top2017.jpg",
"company": "Danske Andelskassers Bank A/S",
"location": "Tjele",
"date_posted": "2024-06-04",
"link": "https://www.epos.dk/REK/DanskeAndelskasser/Joblist/Job.aspx?jobOfferInstanceId=412&joblistId=1&lang=da"
},
{
"id": "PhD scholarship in discovery of Kagome materials for magnetic catalysis - DTU Energy-https://www.dtu.dk/-Kgs. Lyngby-2024-06-04",
"title": "PhD scholarship in discovery of Kagome materials for magnetic catalysis - DTU Energy",
"url": "https://www.dtu.dk/",
"img": "https://www.jobindex.dk/img/logo/DTU_Logo_Corporate_Red_05042019_2.png",
"company": "DTU, Danmarks Tekniske Universitet",
"location": "Kgs. Lyngby",
"date_posted": "2024-06-04",
"link": "https://efzu.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/da/sites/CX_1/job/3581"
} }
] ]