Compare commits

...

86 Commits

Author SHA1 Message Date
06caf796cd Merge pull request 'Update dependency flask-migrate to v4' (!111) from renovate/flask-migrate-4.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#111
2024-09-13 13:13:42 +02:00
54326129e4 Merge pull request 'Update python:3.8.20-alpine Docker digest to 3d93b1f' (!127) from renovate/python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#127
2024-09-13 12:48:09 +02:00
32bb81b69b Update dependency flask-migrate to v4
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-13 10:36:05 +00:00
fc8a06e562 Update python:3.8.20-alpine Docker digest to 3d93b1f
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-13 10:35:25 +00:00
b8b713c620 Merge pull request 'Update dependency reuse to v4' (!126) from renovate/reuse-4.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#126
2024-09-13 12:33:44 +02:00
186ab9af43
Migrate REUSE config
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-13 12:30:48 +02:00
0d77c8d637 Update dependency reuse to v4
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-11 11:37:14 +00:00
72fda5df51 Merge pull request 'Update dependency reuse to v2' (!124) from renovate/reuse-2.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#124
2024-09-11 13:30:28 +02:00
739ce0382b Update dependency reuse to v2
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-11 10:37:32 +00:00
4c345ecc5f Merge pull request 'Update dependency sqlalchemy to v1.4.54' (!119) from renovate/sqlalchemy-1.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#119
2024-09-11 12:00:35 +02:00
5882eeaf2e Update dependency sqlalchemy to v1.4.54
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 18:35:55 +00:00
0512bc0dc3 Merge pull request 'Update dependency flask-migrate to v3.1.0' (!88) from renovate/flask-migrate-3.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#88
2024-09-10 19:42:03 +02:00
319bf9b2f5 Update dependency flask-migrate to v3.1.0
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 17:36:22 +00:00
717454e205 Merge pull request 'Update python Docker tag to v3.8.20' (!121) from renovate/patch-python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#121
2024-09-10 15:49:46 +02:00
496550a959 Update python Docker tag to v3.8.20
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 13:35:28 +00:00
7ebf13edf3 Merge pull request 'Update python:3.8.19-alpine Docker digest to 8b53bd2' (!118) from renovate/python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#118
2024-09-10 15:03:37 +02:00
5409bdeaee Merge pull request 'Verify lockfile before installation' (!120) from verify-lockfile into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: kompetenzinventar/ki-backend#120
2024-09-10 15:03:14 +02:00
4064a65e63
Verify lockfile before installation
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 14:52:44 +02:00
afe22e13c1 Merge pull request 'Update dependency python-dotenv to v1' (!116) from renovate/python-dotenv-1.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#116
2024-09-10 14:30:41 +02:00
e4d0a89053
Update lock file
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 14:27:54 +02:00
78bdd796e0 Update dependency python-dotenv to v1
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/pr Build is passing
2024-09-10 11:36:39 +00:00
c9f83e80b3 Update python:3.8.19-alpine Docker digest to 8b53bd2
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 11:35:27 +00:00
5369de67d8 Merge pull request 'Update dependency pre-commit to v2.21.0' (!89) from renovate/pre-commit-2.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#89
2024-09-10 13:07:34 +02:00
54c5246f0a Merge pull request 'Add dry-run Docker build to Pull Request CI run' (!117) from docker-dry-run into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#117
2024-09-10 13:02:19 +02:00
9a95baf106
Add dry-run Docker build to Pull Request CI run
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-10 12:56:04 +02:00
338380ed93 Update dependency pre-commit to v2.21.0
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-05 09:36:44 +00:00
3d128d771c Merge pull request 'Update dependency flask-cors to v5' (!114) from renovate/flask-cors-5.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#114
2024-09-05 11:26:34 +02:00
6b7517fc7a Update dependency flask-cors to v5
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-04 21:36:04 +00:00
5ceb361da3 Merge pull request 'Update python:3.8.19-alpine Docker digest to c2f31d1' (!113) from renovate/python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#113
2024-09-04 23:03:32 +02:00
4379a06f26 Update python:3.8.19-alpine Docker digest to c2f31d1
All checks were successful
continuous-integration/drone/pr Build is passing
2024-09-04 19:36:16 +00:00
c43f375e4b Merge pull request 'Update dependency flake8 to v7' (!108) from renovate/flake8-7.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#108
2024-09-04 20:44:01 +02:00
621a90b8ab Update dependency flake8 to v7
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 14:36:12 +00:00
033dee7836 Merge pull request 'Update dependency python-dotenv to v0.21.1' (!91) from renovate/python-dotenv-0.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#91
2024-08-28 16:27:46 +02:00
ca81e8bf70
Merge branch 'main' into renovate/python-dotenv-0.x
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 16:02:01 +02:00
d507a20a93 Merge pull request 'Update dependency flake8 to v6' (!107) from renovate/flake8-6.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#107
2024-08-28 15:52:02 +02:00
3f2c23c386
Merge branch 'main' into renovate/flake8-6.x
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 15:46:31 +02:00
b46ac5e379 Merge pull request 'Update dependency pymysql to v1.1.1' (!90) from renovate/pymysql-1.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#90
2024-08-28 15:43:17 +02:00
fa4429b6ef Update dependency flake8 to v6
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 13:37:17 +00:00
7a0f2434db Update dependency python-dotenv to v0.21.1
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 13:36:27 +00:00
8c3fe3fe7d Update dependency pymysql to v1.1.1
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 13:36:11 +00:00
56ade6de68 Merge pull request 'Update dependency flask to v2.3.3' (!87) from renovate/flask-2.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#87
Reviewed-by: Brain <brain@noreply.git.wtf-eg.de>
2024-08-28 15:19:36 +02:00
28cf714217 Update dependency flask to v2.3.3
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 12:35:38 +00:00
9ff56f6676 Merge pull request 'Update dependency yapf to v0.40.2' (!94) from renovate/yapf-0.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#94
2024-08-28 13:46:17 +02:00
2412df4960
Apply yapf and add ignorefile
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 13:43:33 +02:00
469ef511d6 Merge pull request 'Add .python-version file' (!105) from pyenv into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#105
2024-08-28 13:19:28 +02:00
47d2c94b79
Specify license for .python-version
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 12:57:31 +02:00
384dd82454 Update dependency yapf to v0.40.2
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-27 17:38:01 +00:00
b0dcfacd25
Add .python-version file
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-27 19:08:52 +02:00
86edb246bf Merge pull request 'revert f02efab07aeabe02a94efd62fbe498659297b36f' (!102) from revert-python-3.11 into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#102
2024-08-23 15:59:55 +02:00
9424e21edc revert f02efab07a
All checks were successful
continuous-integration/drone/pr Build is passing
revert Merge pull request 'Update python Docker tag to v3.11.9' (!97) from renovate/minor-3.11-python into main

Reviewed-on: kompetenzinventar/ki-backend#97
2024-08-23 15:50:30 +02:00
f02efab07a Merge pull request 'Update python Docker tag to v3.11.9' (!97) from renovate/minor-3.11-python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#97
2024-08-23 15:33:32 +02:00
08f1104942
Merge branch 'main' into renovate/minor-3.11-python
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-23 15:30:29 +02:00
8dde142f38
Try and use Python 3.11
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-23 15:26:39 +02:00
d1b1636aa2 Merge pull request 'Update dependency waitress to v2.1.2' (!93) from renovate/waitress-2.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#93
2024-08-23 12:01:59 +02:00
3fcd1fa20e Update python Docker tag to v3.11.9
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-22 18:37:13 +00:00
8394400e96 Update dependency waitress to v2.1.2
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-22 18:36:55 +00:00
843050f923 Merge pull request 'Update plugins/docker Docker tag to v20.18.4' (!95) from renovate/plugins-docker-20.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#95
2024-08-22 19:53:59 +02:00
812913ffe2 Merge pull request 'Update dependency reuse to v0.14.0' (!92) from renovate/reuse-0.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#92
2024-08-22 19:52:24 +02:00
dee80c7e14 Update plugins/docker Docker tag to v20.18.4
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-22 15:35:49 +00:00
de60ec0d46 Update dependency reuse to v0.14.0
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-22 14:35:41 +00:00
6c6fcea81c Merge pull request 'Update python Docker tag to v3.8.19' (!85) from renovate/patch-python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#85
2024-08-22 13:17:55 +02:00
166e0d40c6 Merge pull request 'Update dependency werkzeug to v2.3.8' (!84) from renovate/werkzeug-2.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#84
2024-08-22 12:39:36 +02:00
c9b5ab62ed Update python Docker tag to v3.8.19
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-22 10:35:35 +00:00
c0005100b4 Update dependency werkzeug to v2.3.8
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-22 10:35:34 +00:00
d614039cdd Merge pull request 'Pin python Docker tag to 0ef73cd' (!83) from renovate/python into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#83
2024-08-22 11:52:25 +02:00
316236a7e5 Merge pull request 'Pin dependencies' (!82) from renovate/pin-dependencies into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: kompetenzinventar/ki-backend#82
2024-08-22 11:51:54 +02:00
c15faabd6d
Pinning werkzeug to v2
All checks were successful
continuous-integration/drone/pr Build is passing
Thanks for the hint in #78
2024-08-22 11:46:27 +02:00
53eab74e60 Pin python Docker tag to 0ef73cd
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-22 09:35:43 +00:00
82d908193c Pin dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-22 09:35:42 +00:00
6620a6819a Merge pull request 'Configure Renovate' (!81) from renovate/configure into main
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Reviewed-on: kompetenzinventar/ki-backend#81
2024-08-22 11:25:28 +02:00
be6fec18ab
Update Renovate config
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-21 22:12:27 +02:00
9ebae03550 Add renovate.json
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-21 19:34:54 +00:00
763a6efc9f Merge pull request 'Improve Docker usage' (!80) from docker-improvements into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#80
2024-08-21 21:22:40 +02:00
6f04d23e6c
Add license information to .dockerignore file
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-21 21:17:33 +02:00
155ddc556c
Add .dockerignore file
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-21 21:09:12 +02:00
a5a85e6032
Fix Dockerfile warnings 2024-08-21 21:08:52 +02:00
6a3458a596
Pin Docker images in CI 2024-08-21 20:53:59 +02:00
97be8f4667
Ditch builder and base Docker images
This should make dependency upgrades easier and bring more clarity to the CI pipelines
2024-08-21 20:49:47 +02:00
776803fc96 Merge pull request 'Add catalan flag' (!77) from HerHde/ki-backend:add-ca-flag into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#77

> Anything else to consider?

I didn't know myself, but it was interesting to find out. No, this should work as soon as deployed. Catalan already exists in the language DB, and the existance of ca.svg is already tested whenever a catalan icon is requested.
2023-12-10 19:08:48 +01:00
702f4968f6 Merge pull request 'Use Gitea registry' (!76) from gitea-registry into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#76
2023-12-10 18:46:35 +01:00
c1285153ef
Add catalan flag
All checks were successful
continuous-integration/drone/pr Build is passing
2023-12-09 21:36:24 +01:00
fdc81844b5
Push image to Gitea registry
All checks were successful
continuous-integration/drone/pr Build is passing
2023-12-04 19:51:27 +01:00
b804c22a93
Use Gitea registry for base images 2023-12-04 19:45:08 +01:00
9a7a9379e2 Merge pull request 'Add labels to Docker images' (!75) from docker-labels into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#75
2023-11-16 11:18:00 +01:00
5b707ad294 Merge pull request 'Rewrite Drone config' (!74) from drone-config into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: kompetenzinventar/ki-backend#74
2023-11-16 11:17:35 +01:00
c05f040313
Add labels to Docker images
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-11-07 14:36:41 +01:00
18 changed files with 637 additions and 587 deletions

13
.dockerignore Normal file
View File

@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
*
!Pipfile
!Pipfile.lock
!data/
!ki/
!LICENSES/
!migrations/
!app.py
!run_prod.py

View File

@ -15,15 +15,28 @@ trigger:
steps: steps:
- name: install-lint-test - name: install-lint-test
image: registry.wtf-eg.net/ki-backend-builder:1.0.0 image: python:3.8.20-alpine@sha256:3d93b1f77efce339aa77db726656872517b0d67837989aa7c4b35bd5ae7e81ba
env:
PYROOT: '/pyroot'
PYTHONUSERBASE: '/pyroot'
commands: commands:
- apk add --no-cache gcc g++ musl-dev python3-dev
- pip3 install pipenv
- pipenv verify
- pipenv install --dev - pipenv install --dev
- pipenv run flake8 - pipenv run flake8
- pipenv run reuse lint - pipenv run reuse lint
- pipenv run python -m unittest discover ki - pipenv run python -m unittest discover ki
- name: docker-dry-run
image_pull_secrets: image: plugins/docker:20.18.4@sha256:a8d3d86853c721492213264815f1d00d3ed13f42f5c1855a02f47fa4d5f1e042
- dockerconfig settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/backend
target: ki-backend
dry_run: true
when:
event:
- pull_request
--- ---
kind: pipeline kind: pipeline
@ -41,10 +54,10 @@ depends_on:
steps: steps:
- name: docker-publish - name: docker-publish
image: plugins/docker image: plugins/docker:20.18.4@sha256:a8d3d86853c721492213264815f1d00d3ed13f42f5c1855a02f47fa4d5f1e042
settings: settings:
registry: registry.wtf-eg.net registry: git.wtf-eg.de
repo: registry.wtf-eg.net/ki-backend repo: git.wtf-eg.de/kompetenzinventar/backend
target: ki-backend target: ki-backend
auto_tag: true auto_tag: true
username: username:
@ -68,7 +81,7 @@ depends_on:
steps: steps:
- name: deploy-dev - name: deploy-dev
image: appleboy/drone-ssh image: appleboy/drone-ssh:1.7.5@sha256:995677e073454912f26d4c0fdd2f9df2e1f5a30d6603d3f2ece667311b6babb3
settings: settings:
host: host:
- dev01.wtf-eg.net - dev01.wtf-eg.net
@ -91,23 +104,25 @@ trigger:
steps: steps:
- name: install-lint-test - name: install-lint-test
image: registry.wtf-eg.net/ki-backend-builder:1.0.0 image: python:3.8.20-alpine@sha256:3d93b1f77efce339aa77db726656872517b0d67837989aa7c4b35bd5ae7e81ba
env:
PYROOT: '/pyroot'
PYTHONUSERBASE: '/pyroot'
commands: commands:
- apk add --no-cache gcc g++ musl-dev python3-dev
- pip3 install pipenv
- pipenv install --dev - pipenv install --dev
- pipenv run flake8 - pipenv run flake8
- pipenv run reuse lint - pipenv run reuse lint
- pipenv run python -m unittest discover ki - pipenv run python -m unittest discover ki
- name: docker-publish - name: docker-publish
image: plugins/docker image: plugins/docker:20.18.4@sha256:a8d3d86853c721492213264815f1d00d3ed13f42f5c1855a02f47fa4d5f1e042
settings: settings:
registry: registry.wtf-eg.net registry: git.wtf-eg.de
repo: registry.wtf-eg.net/ki-backend repo: git.wtf-eg.de/kompetenzinventar/backend
target: ki-backend target: ki-backend
auto_tag: true auto_tag: true
username: username:
from_secret: "docker_username" from_secret: "docker_username"
password: password:
from_secret: "docker_password" from_secret: "docker_password"
image_pull_secrets:
- dockerconfig

1
.python-version Normal file
View File

@ -0,0 +1 @@
3.8.20

View File

@ -1,12 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Kompetenzinventar
Upstream-Contact: Michael Weimann <mail@michael-weimann.eu>
Source: https://git.wtf-eg.de/kompetenzinventar/ki-backend
Files: data/imgs/flags/*
Copyright: 2013 Panayiotis Lipiridis <https://flagicons.lipis.dev/>
License: MIT
Files: Pipfile.lock migrations/*
Copyright: WTF Kooperative eG <https://wtf-eg.de/>
License: AGPL-3.0-or-later

5
.yapfignore Normal file
View File

@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
migrations/*.py

View File

@ -2,7 +2,17 @@
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
FROM registry.wtf-eg.net/ki-backend-builder:1.0.1 as builder FROM python:3.8.20-alpine@sha256:3d93b1f77efce339aa77db726656872517b0d67837989aa7c4b35bd5ae7e81ba AS builder
ENV PYROOT=/pyroot
ENV PYTHONUSERBASE=$PYROOT
RUN apk add --no-cache \
gcc \
g++ \
musl-dev \
python3-dev && \
pip3 install pipenv
COPY Pipfile* ./ COPY Pipfile* ./
@ -10,7 +20,10 @@ RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-
RUN pip3 uninstall --yes pipenv RUN pip3 uninstall --yes pipenv
FROM registry.wtf-eg.net/ki-backend-base:1.0.1 as ki-backend FROM python:3.8.20-alpine@sha256:3d93b1f77efce339aa77db726656872517b0d67837989aa7c4b35bd5ae7e81ba AS ki-backend
ENV PYROOT=/pyroot
ENV PYTHONUSERBASE=$PYROOT
# Install six explicitly. Otherwise Python complains about it missing. # Install six explicitly. Otherwise Python complains about it missing.
RUN pip3 install six RUN pip3 install six
@ -22,4 +35,9 @@ WORKDIR /app
COPY . . COPY . .
LABEL org.opencontainers.image.source=https://git.wtf-eg.de/kompetenzinventar/ki-backend.git
LABEL org.opencontainers.image.url=https://git.wtf-eg.de/kompetenzinventar/ki-backend
LABEL org.opencontainers.image.documentation=https://git.wtf-eg.de/kompetenzinventar/ki-backend#docker
LABEL org.opencontainers.image.vendor="WTF Kooperative eG"
CMD ["python3", "run_prod.py"] CMD ["python3", "run_prod.py"]

29
Pipfile
View File

@ -8,22 +8,23 @@ verify_ssl = true
name = "pypi" name = "pypi"
[packages] [packages]
flask = "~=2.0.1" flask = "==2.3.3"
python-dotenv = "~=0.17.1" python-dotenv = "==1.0.1"
flask-migrate = "~=3.0.1" flask-migrate = "==4.0.7"
flask-sqlalchemy = "~=2.5.1" flask-sqlalchemy = "==2.5.1"
sqlalchemy = "~=1.4.18" sqlalchemy = "==1.4.54"
waitress = "~=2.0.0" waitress = "==2.1.2"
pyyaml = "~=6.0.1" pyyaml = "==6.0.2"
flask-cors = "~=3.0.10" flask-cors = "==5.0.0"
ldap3 = "~=2.9" ldap3 = "==2.9.1"
pymysql = "~=1.0.2" pymysql = "==1.1.1"
werkzeug = "==2.3.8"
[dev-packages] [dev-packages]
flake8 = "~=3.9.2" flake8 = "==7.1.1"
yapf = "~=0.31.0" yapf = "==0.40.2"
pre-commit = "~=2.13.0" pre-commit = "==2.21.0"
reuse = "~=0.13.0" reuse = "==4.0.3"
[requires] [requires]
python_version = "3.8" python_version = "3.8"

1025
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -222,25 +222,6 @@ docker-compose up
Dann http://localhost:13337 aufrufen. Dann http://localhost:13337 aufrufen.
### Workaround, falls der Zugriff auf registry.wtf-eg.net nicht möglich ist
Voraussetzung:
[ki-backend-docker](https://git.wtf-eg.de/kompetenzinventar/ki-backend-docker) muss parallel zum `ki-backend` ausgecheckt sein.
```
cd ki-backend-docker
docker build . --target base -t ki-backend-base
docker build . --target builder -t ki-backend-builder
```
Ändern der 2 Einträge im `Dockerfile` des `ki-backend`:
- registry.wtf-eg.net/ki-backend-builder:1.0.0 -> ki-backend-builder
- registry.wtf-eg.net/ki-backend-base:1.0.0 -> ki-backend-base
Danach sollte `docker-compose up` funktionieren.
## Lizenzen ## Lizenzen
Dieses Projekt erfüllt die [REUSE](https://reuse.software/) Spezifikation. Dieses Projekt erfüllt die [REUSE](https://reuse.software/) Spezifikation.

24
REUSE.toml Normal file
View File

@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: NONE
# SPDX-License-Identifier: CC0-1.0
version = 1
SPDX-PackageName = "Kompetenzinventar Backend"
SPDX-PackageDownloadLocation = "https://git.wtf-eg.de/kompetenzinventar/ki-backend"
[[annotations]]
path = "data/imgs/flags/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2013 Panayiotis Lipiridis <https://flagicons.lipis.dev/>"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = ["Pipfile.lock", "migrations/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "WTF Kooperative eG <https://wtf-eg.de/>"
SPDX-License-Identifier = "AGPL-3.0-or-later"
[[annotations]]
path = ["renovate.json", ".python-version"]
precedence = "aggregate"
SPDX-FileCopyrightText = "WTF Kooperative eG <https://wtf-eg.de/>"
SPDX-License-Identifier = "AGPL-3.0-or-later"

5
data/imgs/flags/ca.svg Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="810" height="540">
<rect width="810" height="540" fill="#FCDD09"/>
<path stroke="#DA121A" stroke-width="60" d="M0,90H810m0,120H0m0,120H810m0,120H0"/>
</svg>

After

Width:  |  Height:  |  Size: 242 B

View File

@ -17,6 +17,7 @@ content_type_png = "image/png"
def token_auth(func): def token_auth(func):
@wraps(func) @wraps(func)
def _token_auth(*args, **kwargs): def _token_auth(*args, **kwargs):
auth_header = request.headers.get("Authorization") auth_header = request.headers.get("Authorization")

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestContactTypesEndpoint(ApiTest): class TestContactTypesEndpoint(ApiTest):
def test_skills_options(self): def test_skills_options(self):
response = self.client.options("/contacttypes") response = self.client.options("/contacttypes")
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestFindProfilesEndpoint(ApiTest): class TestFindProfilesEndpoint(ApiTest):
def test_find_profiles_options(self): def test_find_profiles_options(self):
response = self.client.options("/users/profiles") response = self.client.options("/users/profiles")
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestLanguagesEndpoint(ApiTest): class TestLanguagesEndpoint(ApiTest):
def test_skills_options(self): def test_skills_options(self):
response = self.client.options("/languages") response = self.client.options("/languages")
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)

View File

@ -10,6 +10,7 @@ from ki.test.ApiTest import ApiTest
class TestLoginEndpoint(ApiTest): class TestLoginEndpoint(ApiTest):
def test_login(self): def test_login(self):
response1_data = self.login("peter", "geheim") response1_data = self.login("peter", "geheim")
response2_data = self.login("peter", "geheim") response2_data = self.login("peter", "geheim")

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestSkillsEndpoint(ApiTest): class TestSkillsEndpoint(ApiTest):
def test_skills_options(self): def test_skills_options(self):
response = self.client.options("/skills") response = self.client.options("/skills")
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)

18
renovate.json Normal file
View File

@ -0,0 +1,18 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:best-practices",
":disableDependencyDashboard",
":maintainLockFilesMonthly",
":pinVersions",
":separateMultipleMajorReleases"
],
"packageRules": [
{
"matchDepNames": ["python"],
"groupName": "Python",
"separateMinorPatch": true,
"separateMultipleMinor": true
}
]
}