Skip to content

Commit c6ebc63

Browse files
committed
chore(server): remove leftover server/server artifacts after flattening
1 parent 376c6d0 commit c6ebc63

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/docker-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
3737
- name: Build and push editor-api image
3838
run: |
39-
docker build -t ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest ./server/server
39+
docker build -t ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest ./server
4040
docker push ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest
4141
4242
deploy-to-appservice:

server/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Dockerfile for editor mock API (TypeScript/Express)
2+
FROM node:18-alpine AS build
3+
WORKDIR /app
4+
# Copy only package.json from the build context. The repo root package-lock.json
5+
# is not available when building from the subfolder context, which caused
6+
# BuildKit checksum errors. Use npm ci when a lockfile exists, otherwise
7+
# fall back to npm install so the build doesn't fail.
8+
COPY package.json ./
9+
RUN npm ci --production=false || npm install --production=false
10+
COPY tsconfig.json ./
11+
COPY src ./src
12+
RUN npm run build
13+
14+
FROM node:18-alpine
15+
WORKDIR /app
16+
# Install only production deps
17+
COPY package.json ./
18+
# If a package-lock.json is present, npm ci will be used; if not, fall back
19+
# to npm install so the build doesn't fail when the lockfile is absent in the
20+
# build context (common when CI checkouts or subfolders don't include it).
21+
RUN npm ci --production || npm install --production
22+
COPY --from=build /app/dist ./dist
23+
EXPOSE 4000
24+
CMD ["node", "dist/index.js"]

server/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "app-scripting-server",
2+
"name": "app-scripting-editor-server",
33
"version": "0.1.0",
44
"private": true,
55
"main": "dist/index.js",
@@ -14,6 +14,7 @@
1414
},
1515
"devDependencies": {
1616
"@types/express": "^4.17.17",
17+
"@types/cors": "^2.8.12",
1718
"@types/node": "^18.0.0",
1819
"ts-node-dev": "^2.0.0",
1920
"typescript": "^5.0.4"

0 commit comments

Comments
 (0)