-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merging 35 improve onboarding experience (#42)
See changelog v0.1.0 --------- Co-authored-by: Sebastian Mohr <sebastian@mohrenclan.de>
- Loading branch information
Showing
96 changed files
with
3,704 additions
and
2,514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,32 @@ | ||
.conda/ | ||
venv/ | ||
.venv/ | ||
.git | ||
node_modules/ | ||
.pnpm-store/ | ||
# following this reference suggesting to exclude everything, and only | ||
# manually include whats needed | ||
# https://markbirbeck.com/2018/12/07/getting-control-of-your-dockerignore-files/ | ||
|
||
# Let's taylor the docker ignore only for the production image, there is no real | ||
# need to push the dev image to the registry | ||
|
||
* | ||
|
||
!backend/beets_flask | ||
!backend/pyproject.toml | ||
!backend/main.py | ||
!backend/launch_redis_workers.py | ||
|
||
!configs/ | ||
|
||
!frontend/src/ | ||
!frontend/public/ | ||
!frontend/dist/ | ||
|
||
!frontend/.eslintrc.js | ||
!frontend/index.html | ||
!frontend/package.json | ||
!frontend/pnpm-lock.yaml | ||
!frontend/postcss.config.js | ||
!frontend/tailwind.config.js | ||
!frontend/tsconfig.json | ||
!frontend/vite.config.ts | ||
|
||
!README.md | ||
!LICENSE | ||
!entrypoint*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: docker-hub | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
- "test-*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
# generate Docker tags based on the following events/attributes | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
pspitzner/beets-flask | ||
ghcr.io/pspitzner/beets-flask | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=ref,event=tag | ||
type=semver,pattern={{raw}} | ||
type=sha | ||
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | ||
type=raw,value=latest,enable=true | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
target: prod | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Ruff | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["main"] | ||
|
||
jobs: | ||
ruff: | ||
name: Ruff check and linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
cd ./backend | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
# Update output format to enable automatic inline annotations. | ||
- name: Run Ruff | ||
run: | | ||
cd ./backend | ||
ruff check --output-format=github . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.6.5 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [--fix, --config=./backend/pyproject.toml] | ||
# Run the formatter. | ||
- id: ruff-format | ||
args: [--config=./backend/pyproject.toml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2024 F. Paul Spitzner, Sebastian B. Mohr | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Oops, something went wrong.