Adjust xcontrol-init build context (#775)
This commit is contained in:
parent
fc02230e53
commit
554ea7bf8b
18
.github/workflows/build-service-images.yml
vendored
18
.github/workflows/build-service-images.yml
vendored
@ -83,10 +83,10 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
service:
|
||||
- { name: account, workdir: account }
|
||||
- { name: dashboard, workdir: dashboard }
|
||||
- { name: rag-server, workdir: rag-server }
|
||||
- { name: xcontrol-init, workdir: xcontrol-init }
|
||||
- { name: account, workdir: account, dockerfile: account/Dockerfile }
|
||||
- { name: dashboard, workdir: dashboard, dockerfile: dashboard/Dockerfile }
|
||||
- { name: rag-server, workdir: rag-server, dockerfile: rag-server/Dockerfile }
|
||||
- { name: xcontrol-init, workdir: /, dockerfile: xcontrol-init/Dockerfile }
|
||||
|
||||
steps:
|
||||
# -------------------------------------------------------------
|
||||
@ -126,7 +126,7 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ${{ matrix.service.workdir }}
|
||||
file: ${{ matrix.service.workdir }}/Dockerfile
|
||||
file: ${{ matrix.service.dockerfile }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ env.PUSH_IMAGES == 'true' || env.PUSH_IMAGES == true }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
@ -173,10 +173,10 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
service:
|
||||
- { name: dashboard, workdir: dashboard }
|
||||
- { name: account, workdir: account }
|
||||
- { name: rag-server, workdir: rag-server }
|
||||
- { name: xcontrol-init, workdir: xcontrol-init }
|
||||
- { name: dashboard, workdir: dashboard, dockerfile: dashboard/Dockerfile }
|
||||
- { name: account, workdir: account, dockerfile: account/Dockerfile }
|
||||
- { name: rag-server, workdir: rag-server, dockerfile: rag-server/Dockerfile }
|
||||
- { name: xcontrol-init, workdir: /, dockerfile: xcontrol-init/Dockerfile }
|
||||
|
||||
steps:
|
||||
# -------------------------------------------------------------
|
||||
|
||||
@ -8,9 +8,12 @@ FROM golang:1.25 AS builder
|
||||
WORKDIR /workspace
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# 复制 account 模块源码
|
||||
# 复制 account 和 rag-server 模块源码
|
||||
# ------------------------------------------------------------
|
||||
COPY account/go.mod account/go.sum ./account/
|
||||
COPY account ./account
|
||||
COPY rag-server ./rag-server
|
||||
|
||||
|
||||
RUN cd account && go mod download
|
||||
COPY account ./account
|
||||
|
||||
@ -50,7 +53,7 @@ COPY --from=builder /createadmin /usr/local/bin/createadmin
|
||||
# ------------------------------------------------------------
|
||||
# 拷贝初始化脚本(init-db.sh)
|
||||
# ------------------------------------------------------------
|
||||
COPY scripts/init-db.sh /usr/local/bin/init-db.sh
|
||||
COPY xcontrol-init/scripts/init-db.sh /usr/local/bin/init-db.sh
|
||||
RUN chmod +x /usr/local/bin/init-db.sh
|
||||
|
||||
# ------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user