Skip to content

Commit 8659e0c

Browse files
committed
ci: use pushed editor image as web-build stage; pass REGISTRY build-arg to server build
1 parent 71323a8 commit 8659e0c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

.github/workflows/docker-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
- name: Build and push editor-api image
4444
run: |
4545
docker build \
46+
--build-arg REGISTRY=${{ steps.registry.outputs.registry }} \
4647
--build-arg VITE_APP_BUILD_TIME=${{ github.event.head_commit.timestamp }} \
4748
--build-arg VITE_APP_COMMIT_SHA=${{ github.sha }} \
4849
--build-arg VITE_APP_VERSION=1.0.0 \

server/Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Multi-stage Dockerfile: build frontend and server, produce single image
22

3-
# 1) Build web (editor)
4-
FROM node:20-alpine AS web-build
5-
WORKDIR /web
6-
COPY editor/package.json editor/package-lock.json* ./
7-
WORKDIR /web
8-
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
9-
COPY editor/ ./editor
10-
WORKDIR /web/editor
11-
RUN npm run build
3+
# 1) Use previously built editor image (pushed to registry) as web-build
4+
# This avoids requiring the 'editor/' directory in the Docker build context.
5+
ARG REGISTRY
6+
FROM ${REGISTRY}/app-scripting-editor:latest AS web-build
127

138
# 2) Build server
149
FROM node:18-alpine AS server-build

0 commit comments

Comments
 (0)