Compare commits
4 Commits
4df5f18b67
...
4c643b18dd
Author | SHA1 | Date | |
---|---|---|---|
4c643b18dd | |||
b89381fdfc | |||
a91e1f7018 | |||
599eaba14a |
@ -86,7 +86,7 @@ test:debian:
|
|||||||
- apt-get purge -qq -y fastapi-dls
|
- apt-get purge -qq -y fastapi-dls
|
||||||
- apt-get autoremove -qq -y && apt-get clean -qq
|
- apt-get autoremove -qq -y && apt-get clean -qq
|
||||||
|
|
||||||
deploy:
|
deploy:docker:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
@ -107,3 +107,35 @@ deploy:
|
|||||||
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
||||||
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
|
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
|
||||||
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
||||||
|
|
||||||
|
deploy:debian:
|
||||||
|
image: debian:bookworm-slim
|
||||||
|
stage: deploy
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == "debian" # $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
needs:
|
||||||
|
- job: build:debian
|
||||||
|
artifacts: true
|
||||||
|
before_script:
|
||||||
|
- apt-get update -qq && apt-get install -qq -y curl
|
||||||
|
script:
|
||||||
|
# Naming format: <name>_<version>-<release>_<arch>.deb
|
||||||
|
# Version is the version number of the app being packaged
|
||||||
|
# Release number is the version number of the *packaging* itself.
|
||||||
|
# The release number might increment if the package maintainer
|
||||||
|
# updated the packaging, while the version number of the application
|
||||||
|
# being packaged did not change.
|
||||||
|
- BUILD_NAME=build.deb # inherited by build-stage
|
||||||
|
- PACKAGE_NAME=`dpkg -I build/build.deb | grep "Package:" | awk '{ print $2 }'`
|
||||||
|
- PACKAGE_VERSION=`dpkg -I build/build.deb | grep "Version:" | awk '{ print $2 }'`
|
||||||
|
- PACKAGE_ARCH=amd64
|
||||||
|
- EXPORT_NAME="${PACKAGE_NAME}_${PACKAGE_VERSION}-0_${PACKAGE_ARCH}.deb"
|
||||||
|
- mv ${BUILD_NAME} ${EXPORT_NAME}
|
||||||
|
- 'echo "PACKAGE_NAME: ${PACKAGE_NAME}"'
|
||||||
|
- 'echo "PACKAGE_VERSION: ${PACKAGE_VERSION}"'
|
||||||
|
- 'echo "PACKAGE_ARCH: ${PACKAGE_ARCH}"'
|
||||||
|
- 'echo "EXPORT_NAME: ${EXPORT_NAME}"'
|
||||||
|
# https://docs.gitlab.com/14.3/ee/user/packages/debian_repository/index.html
|
||||||
|
- URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/debian/${EXPORT_NAME}"
|
||||||
|
- 'echo "URL: ${URL}"'
|
||||||
|
- 'curl --request PUT --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} ${URL}'
|
||||||
|
10
README.md
10
README.md
@ -35,7 +35,7 @@ Generate client token, (see [installation](#installation)).
|
|||||||
|
|
||||||
There are some more internal api endpoints for handling authentication and lease process.
|
There are some more internal api endpoints for handling authentication and lease process.
|
||||||
|
|
||||||
# Setup
|
# Setup (Service)
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
@ -194,10 +194,16 @@ with `systemctl start fastapi-dls.service`.
|
|||||||
| `DATABASE` | `sqlite:///db.sqlite` | See [official dataset docs](https://dataset.readthedocs.io/en/latest/quickstart.html) |
|
| `DATABASE` | `sqlite:///db.sqlite` | See [official dataset docs](https://dataset.readthedocs.io/en/latest/quickstart.html) |
|
||||||
| `CORS_ORIGINS` | `https://{DLS_URL}` | Sets `Access-Control-Allow-Origin` header (comma separated string) |
|
| `CORS_ORIGINS` | `https://{DLS_URL}` | Sets `Access-Control-Allow-Origin` header (comma separated string) |
|
||||||
|
|
||||||
# Installation
|
# Installation (Client)
|
||||||
|
|
||||||
**The token file has to be copied! It's not enough to C&P file contents, because there can be special characters.**
|
**The token file has to be copied! It's not enough to C&P file contents, because there can be special characters.**
|
||||||
|
|
||||||
|
Successfully tested with this package versions:
|
||||||
|
|
||||||
|
- `14.3` (Linux-Host: `510.108.03`, Linux-Guest: `510.108.03`, Windows-Guest: `513.91`)
|
||||||
|
- `14.4` (Linux-Host: `510.108.03`, Linux-Guest: `510.108.03`, Windows-Guest: `514.08`)
|
||||||
|
- `15.0` (Linux-Host: `525.60.12`, Linux-Guest: `525.60.13`, Windows-Guest: `527.41`)
|
||||||
|
|
||||||
## Linux
|
## Linux
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
Loading…
Reference in New Issue
Block a user