Skip to content

Commit

Permalink
better build
Browse files Browse the repository at this point in the history
  • Loading branch information
corgijan committed Oct 19, 2024
1 parent 11433c9 commit 7b0c2da
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Publish Docker Image

on:
workflow_dispatch:
inputs:
image_name:
description: 'Jans Rezepte'
required: true
default: 'rezepte'
push:
branches: [ "development" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build and tag Docker image
run: |
docker build -t ${{ github.event.inputs.image_name }}:latest .
docker tag ${{ github.event.inputs.image_name }}:latest ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.inputs.image_name }}:latest
- name: Push Docker image to Docker Hub
run: |
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.inputs.image_name }}:latest
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__pycache__
data.json
data/data.json
data.db
data_a.db
data.txt
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Bäckerone was created while cycling with my friends with the idea to take the c
4. start server (poetry run python -m flask run)
```


4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
app.secret_key = os.urandom(64)
app.config['MAX_CONTENT_LENGTH'] = 2 * 1024 * 1024

DB_DRIVER = "SQLITE" # JSON or SQLITE
DATAFILE = "data.db"
DB_DRIVER = "JSON" # JSON or SQLITE
DATAFILE = "data/data.json"
PASSPHRASE = os.environ.get("RECIPE_PASSPHRASE") or "ichessegernekuchen"

header = """
Expand Down

0 comments on commit 7b0c2da

Please sign in to comment.