Compare commits
No commits in common. "main" and "v0.16.1" have entirely different histories.
44
.github/workflows/main.yml
vendored
44
.github/workflows/main.yml
vendored
@ -4,47 +4,19 @@ on:
|
||||
tags:
|
||||
- '*'
|
||||
jobs:
|
||||
release:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@master
|
||||
- name: Zip Artifacts
|
||||
uses: https://github.com/thedoctor0/zip-release@master
|
||||
- uses: actions/checkout@master
|
||||
- name: Archive Server
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'server.zip'
|
||||
exclusions: '*.git*'
|
||||
- name: Release Archive
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
server_url: https://gitea.wpgcommunity.net
|
||||
files: 'server.zip'
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@master
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ vars.DOCKER_REPO }}/costhive
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."${{ vars.DOCKER_REPO }}"]
|
||||
http = true
|
||||
insecure = true
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.DOCKER_REPO }}
|
||||
username: ${{ vars.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
- name: Build and push
|
||||
uses: https://github.com/docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
allowUpdates: true
|
||||
artifacts: "server.zip"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
FROM python@sha256:c66cf219ac0083a9af2ff90e16530f16cd503c59eb7909feb3b8f3524dc1a87e
|
||||
# python:3.12.2-slim-bullseye (amd64)
|
||||
FROM python@sha256:21c9f0b22213295a13bd678c5b45aa587ff6cb01cd99b6cf0e6928f4c777006b
|
||||
# python:3.11.4-slim-bullseye (arm/v7)
|
||||
RUN useradd costhive
|
||||
|
||||
WORKDIR /home/costhive
|
||||
@ -16,7 +16,7 @@ RUN python -m venv venv; \
|
||||
|
||||
COPY backend backend
|
||||
|
||||
ENV FLASK_APP=run.py
|
||||
ENV FLASK_APP run.py
|
||||
|
||||
RUN chmod +x boot.sh; \
|
||||
chown -R costhive:costhive .
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1,38 +0,0 @@
|
||||
"""raise password char length
|
||||
|
||||
Revision ID: 782a2409df41
|
||||
Revises: 926395732c3e
|
||||
Create Date: 2025-06-03 21:01:23.169897
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '782a2409df41'
|
||||
down_revision = '926395732c3e'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.alter_column('password_hash',
|
||||
existing_type=sa.VARCHAR(length=128),
|
||||
type_=sa.String(length=255),
|
||||
existing_nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.alter_column('password_hash',
|
||||
existing_type=sa.String(length=255),
|
||||
type_=sa.VARCHAR(length=128),
|
||||
existing_nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
@ -9,7 +9,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
|
||||
class User(UserMixin, db.Model):
|
||||
id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
|
||||
email = db.Column(db.String(255), nullable=False, unique=True)
|
||||
password_hash = db.Column(db.String(255), nullable=False)
|
||||
password_hash = db.Column(db.String(128), nullable=False)
|
||||
|
||||
LoginToken = db.relationship("LoginToken", backref='User', lazy='dynamic')
|
||||
Bought = db.relationship("Bought", secondary="login_token",
|
||||
|
||||
@ -27,7 +27,7 @@ class PDFReceipt:
|
||||
with fitz.open(file, filetype="pdf") as doc:
|
||||
words = []
|
||||
for page in doc:
|
||||
words.extend(page.get_text("words", textpage=page.get_textpage_ocr(language = 'deu'), sort=True))
|
||||
words.extend(page.get_text("words", textpage=page.get_textpage_ocr(), sort=True))
|
||||
return words
|
||||
|
||||
def _getStoreName(words: list[tuple]) -> str:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user