mirror of
https://github.com/kingmo888/rustdesk-api-server.git
synced 2025-09-15 15:28:42 +08:00
0320
This commit is contained in:
parent
a8b07cbc35
commit
5020b45962
119
.github/workflows/build.yml
vendored
Normal file
119
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
name: RustDesk Web Api
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
docker_username:
|
||||
description: 'docker user name'
|
||||
required: true
|
||||
default: ''
|
||||
docker_password:
|
||||
description: 'docker user password'
|
||||
required: true
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
alpine:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build Docker Image (Alpine)
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: Release version
|
||||
id: release_version
|
||||
run: |
|
||||
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
||||
echo "app_version=${app_version}" >> $GITHUB_ENV
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ github.event.inputs.docker_username }}/rustdesk-api-server
|
||||
tags: |
|
||||
type=raw,value=${{ env.app_version }}
|
||||
type=raw,value=latest
|
||||
|
||||
-
|
||||
name: Set Up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
-
|
||||
name: Set Up Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
-
|
||||
name: Login DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ github.event.inputs.docker_username }}
|
||||
password: ${{ github.event.inputs.docker_password }}
|
||||
|
||||
-
|
||||
name: Build Image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: docker
|
||||
file: docker/Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
debian:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build Docker Image (Debian)
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: Release version
|
||||
id: release_version
|
||||
run: |
|
||||
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
||||
echo "app_version=${app_version}-debian" >> $GITHUB_ENV
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ github.event.inputs.docker_username }}/rustdesk-api-server
|
||||
tags: |
|
||||
type=raw,value=${{ env.app_version }}
|
||||
type=raw,value=debian
|
||||
|
||||
-
|
||||
name: Set Up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
-
|
||||
name: Set Up Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
-
|
||||
name: Login DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ github.event.inputs.docker_username }}
|
||||
password: ${{ github.event.inputs.docker_password }}
|
||||
|
||||
-
|
||||
name: Build Image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: docker
|
||||
file: docker/debian.Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -26,4 +26,6 @@ dist_py38
|
||||
LICENSE.rst
|
||||
|
||||
db/test_db.sqlite3
|
||||
job2en.py
|
||||
job2en.py
|
||||
|
||||
新建文本文档.txt
|
||||
@ -32,7 +32,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
AUTH_USER_MODEL = 'api.UserProfile' #AppName.自定义user
|
||||
|
||||
ALLOW_REGISTRATION = os.environ.get("ALLOW_REGISTRATION", "True") == "True" # 是否允许注册, True为允许,False为不允许
|
||||
ALLOW_REGISTRATION = os.environ.get("ALLOW_REGISTRATION", "True") or os.environ.get("ALLOW_REGISTRATION", "True") == "True" # 是否允许注册, True为允许,False为不允许
|
||||
|
||||
#==========数据库配置 开始=====================
|
||||
DATABASE_TYPE = os.environ.get("DATABASE_TYPE", 'SQLITE')
|
||||
|
||||
1
version.py
Normal file
1
version.py
Normal file
@ -0,0 +1 @@
|
||||
APP_VERSION = 'v3.3.15'
|
||||
@ -1,4 +0,0 @@
|
||||
python manage.py makemessages -l zh_Hans -i xlwt -i django
|
||||
python manage.py makemessages -l en -i xlwt -i django
|
||||
|
||||
python manage.py compilemessages --pythonpath E:\python_workspace\rustdesk-server-api-python\rustdesk_server_api_github\locale\zh_Hans\LC_MESSAGES
|
||||
Loading…
Reference in New Issue
Block a user