Skip to content

Commit

Permalink
Merge pull request #30 from ZeusWPI/feat/docker
Browse files Browse the repository at this point in the history
Feat/docker
  • Loading branch information
tyboro2002 authored Dec 20, 2024
2 parents 903fdba + 5004849 commit 73177f0
Show file tree
Hide file tree
Showing 23 changed files with 6,305 additions and 8,227 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv/
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docker Build and Push

on:
push:
branches:
- master
pull_request:

concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build . -t ghcr.io/zeuswpi/haldis_een_prijsje:pr-${{ github.sha }}
if [ "${{ github.event_name }}" == "push" ]; then
docker tag ghcr.io/zeuswpi/haldis_een_prijsje:pr-${{ github.sha }} ghcr.io/zeuswpi/haldis_een_prijsje:latest
fi
- name: Push Docker image
if: github.event_name == 'push'
run: docker push --all-tags ghcr.io/zeuswpi/haldis_een_prijsje
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python 3.12.4
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use an official Python runtime as the base image
FROM python:3.12.4

RUN apt-get update
RUN apt-get install -y chromium

# Set the working directory in the container
WORKDIR /haldis_prijsje


# Copy the entire project directory (including requirements.txt) into the container
COPY . .

# Install dependencies
RUN pip install -r requirements.txt

# Expose the port Flask will run on
EXPOSE 5000

# Set the entry point to run the Flask app (assuming app.py is located in the root of /flask-app)
CMD ["python", "/haldis_prijsje/website/app.py"]
16 changes: 16 additions & 0 deletions Dockerfile.scraper
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.12.4-alpine

WORKDIR /haldis

COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .

VOLUME hlds_files/

ENTRYPOINT ["python", "main.py"]
CMD []

# docker build -t haldis-een-prijsje .
# docker run -v $(pwd)/hlds_files:/haldis/hlds_files haldis-een-prijsje
4 changes: 3 additions & 1 deletion data_types/choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def __repr__(self):


class ChoiceList:
def __init__(self, name: str = "", description: str = "", type: ChoiceType = ChoiceType.SINGLE, choices=[]):
def __init__(self, name: str = "", description: str = "", type: ChoiceType = ChoiceType.SINGLE, choices=None):
if choices is None:
choices = []
self.type: ChoiceType = type
self.choices = choices
self.name: str = name
Expand Down
Empty file.
Empty file added downloaded_files/pyautogui.lock
Empty file.
164 changes: 82 additions & 82 deletions hlds_files/bicyclette.hlds
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
==========================
bicyclette: Bicyclette
osm https://www.openstreetmap.org/node/9787361791#map=19/51.030240/3.706148
phone +32 468 13 09 20
address Voskenslaan 187, 9000 Gent
website https://labicyclettepastabar.be/
==========================
dish alfredo: Alfredo -- saus van Parmezaanse kaas met kippenspek & look € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish bolognaise: Bolognaise -- tomatensaus & gehakt € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish carbonara: Carbonara -- kaassaus met kalkoenhamblokjes & champignons € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish kaas_&_ham: Kaas & ham -- kaassaus & kalkoenhamblokjes € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish napolitana__diabolique: Napolitana Diabolique -- tomaten & gemixte groenten – pikante tomatensaus € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish portie_kaas: Portie kaas € 0.5
dish portie_kaas_&_saus: Portie kaas & saus € 1.5
dish portie_saus: Portie saus € 1.0
dish potje_kaas_(apart): Potje kaas (apart) € 0.6
dish roze_peperroomsaus: Roze peperroomsaus -- met kippenballetjes € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish thai_chicken: Thai chicken -- Thaise currysaus & kipreepjes € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish vierkazen: Vierkazen -- vierkazensaus € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish wekelijkse_special: Wekelijkse special -- saus van de week € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish zalm: Zalm -- bieslooksaus & gerookte zalm € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
==========================
bicyclette: Bicyclette
osm https://www.openstreetmap.org/node/9787361791#map=19/51.030240/3.706148
phone +32 468 13 09 20
address Voskenslaan 187, 9000 Gent
website https://labicyclettepastabar.be/
==========================

dish alfredo: Alfredo -- saus van Parmezaanse kaas met kippenspek & look € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish bolognaise: Bolognaise -- tomatensaus & gehakt € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish carbonara: Carbonara -- kaassaus met kalkoenhamblokjes & champignons € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish kaas_&_ham: Kaas & ham -- kaassaus & kalkoenhamblokjes € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish napolitana__diabolique: Napolitana Diabolique -- tomaten & gemixte groenten – pikante tomatensaus € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish portie_kaas: Portie kaas € 0.5
dish portie_kaas_&_saus: Portie kaas & saus € 1.5
dish portie_saus: Portie saus € 1.0
dish potje_kaas_(apart): Potje kaas (apart) € 0.6
dish roze_peperroomsaus: Roze peperroomsaus -- met kippenballetjes € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish thai_chicken: Thai chicken -- Thaise currysaus & kipreepjes € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish vierkazen: Vierkazen -- vierkazensaus € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish wekelijkse_special: Wekelijkse special -- saus van de week € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
dish zalm: Zalm -- bieslooksaus & gerookte zalm € 6.0
single_choice :
mini: Mini € 0.0
small: Small € 1.0
medium: Medium € 2.0
large: Large € 3.0
glutenvrij: Glutenvrij € 4.0
Loading

0 comments on commit 73177f0

Please sign in to comment.