Skip to content

Commit 38979e4

Browse files
committed
fix(sfu): change build context for accomodating type dir change
1 parent d2682be commit 38979e4

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/build-sfu.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- name: Build and push Docker image
2929
uses: docker/build-push-action@v5
3030
with:
31-
context: ./sfu-server
31+
context: .
32+
file: ./sfu-server/Dockerfile
3233
push: true
3334
tags: ghcr.io/frappe/meet/sfu-server:latest

sfu-server/Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ WORKDIR /app
77
RUN apt-get update && apt-get install -y --no-install-recommends \
88
python3 build-essential python3-pip pkg-config libssl-dev git ca-certificates \
99
&& rm -rf /var/lib/apt/lists/*
10-
COPY package*.json tsconfig.json ./
10+
11+
# Copy the shared types directory
12+
COPY types /app/types
13+
14+
# Copy sfu-server source code
15+
WORKDIR /app/sfu-server
16+
COPY sfu-server/package*.json sfu-server/tsconfig.json ./
1117
RUN npm ci
12-
COPY src ./src
18+
COPY sfu-server/src ./src
1319
RUN npm run build
1420

1521
# --- Runtime stage (minimal) ---
1622
FROM node:${NODE_VERSION} AS runtime
17-
WORKDIR /app
23+
WORKDIR /app/sfu-server
1824
ENV NODE_ENV=production \
1925
PORT=3000
2026

@@ -24,7 +30,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends tini ca-certifi
2430
COPY --from=build /app /app
2531

2632
# Create logs dir and set ownership to existing 'node' user (already in base image)
27-
RUN mkdir -p /app/logs && chown -R node:node /app
33+
RUN mkdir -p /app/sfu-server/logs && chown -R node:node /app
2834

2935
USER node
3036

0 commit comments

Comments
 (0)