-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
30 lines (24 loc) · 905 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Frontend Builder
FROM node:20-alpine AS frontend
WORKDIR /app
COPY . .
RUN npm install -g pnpm && pnpm install
RUN pnpm run build && pnpm prune --prod
# Final Image
FROM node:20-alpine
LABEL name="Riven" \
description="Riven Media Server: Frontend" \
url="https://github.com/rivenmedia/riven-frontend"
# Set working directory
WORKDIR /riven
# Copy frontend build from the previous stage
COPY --from=frontend /app/build /riven/build
COPY --from=frontend /app/node_modules /riven/node_modules
COPY --from=frontend /app/package.json /riven/package.json
COPY version.txt /riven/
# ENTRYPOINT ["ORIGIN=$ORIGIN", "BACKEND_URL=$BACKEND_URL", "node", "/riven/build"]
# Add the entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["node", "/riven/build"]