mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 07:52:50 +00:00
build: 分开镜像
This commit is contained in:
parent
863f0a65a4
commit
2433e72033
|
|
@ -2,7 +2,16 @@ name: build-and-push-python-pg
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
inputs:
|
||||
architecture:
|
||||
description: 'Architecture'
|
||||
required: true
|
||||
default: 'linux/amd64'
|
||||
type: choice
|
||||
options:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/amd64,linux/arm64
|
||||
jobs:
|
||||
build-and-push-python-pg-to-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -29,7 +38,7 @@ jobs:
|
|||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=ghcr.io/maxkb-dev/python-pg
|
||||
DOCKER_PLATFORMS=linux/amd64,linux/arm64
|
||||
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
|
||||
TAG_NAME=python3.11.8-pg15.3
|
||||
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,20 @@ name: build-and-push-vector-model
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dockerImageTag:
|
||||
description: 'Docker Image Tag'
|
||||
default: 'v1.0.0'
|
||||
required: true
|
||||
architecture:
|
||||
description: 'Architecture'
|
||||
required: true
|
||||
default: 'linux/amd64'
|
||||
type: choice
|
||||
options:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/amd64,linux/arm64
|
||||
|
||||
jobs:
|
||||
build-and-push-vector-model-to-ghcr:
|
||||
|
|
@ -29,8 +43,8 @@ jobs:
|
|||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=ghcr.io/maxkb-dev/vector-model
|
||||
DOCKER_PLATFORMS=linux/amd64,linux/arm64
|
||||
TAG_NAME=v1.0.0
|
||||
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
|
||||
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
|
||||
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=version::${TAG_NAME}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,15 @@ on:
|
|||
description: 'Docker Image Tag'
|
||||
default: 'v1.0.0'
|
||||
required: true
|
||||
architecture:
|
||||
description: 'Architecture'
|
||||
required: true
|
||||
default: 'linux/amd64'
|
||||
type: choice
|
||||
options:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/amd64,linux/arm64
|
||||
|
||||
jobs:
|
||||
build-and-push-fit2cloud-registry:
|
||||
|
|
@ -34,7 +43,7 @@ jobs:
|
|||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=registry-hkproxy.fit2cloud.com/maxkb/maxkb
|
||||
DOCKER_PLATFORMS=linux/amd64
|
||||
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
|
||||
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
|
||||
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
|
|
@ -90,7 +99,7 @@ jobs:
|
|||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=ghcr.io/maxkb-dev/maxkb
|
||||
DOCKER_PLATFORMS=linux/amd64
|
||||
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
|
||||
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
|
||||
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ RUN cd ui && \
|
|||
FROM ghcr.io/maxkb-dev/python-pg:python3.11.8-pg15.3
|
||||
# 创建工作目录
|
||||
RUN mkdir -p /opt/maxkb/app && mkdir -p /opt/maxkb/model && mkdir -p /opt/maxkb/conf
|
||||
VOLUME /opt/maxkb
|
||||
# 拷贝项目
|
||||
COPY . /opt/maxkb/app
|
||||
COPY installer/config.yaml /opt/maxkb/conf
|
||||
|
|
@ -37,6 +36,7 @@ RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
|
|||
# 下载python依赖
|
||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
# 启动命令
|
||||
VOLUME /opt/maxkb/conf
|
||||
EXPOSE 8000
|
||||
COPY installer/run-maxkb.sh /usr/bin/
|
||||
RUN chmod 755 /usr/bin/run-maxkb.sh
|
||||
|
|
|
|||
Loading…
Reference in New Issue