mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 07:14:53 +00:00
26 lines
444 B
Docker
26 lines
444 B
Docker
FROM node:20 as builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build auth
|
|
RUN npm run build backend
|
|
|
|
FROM nginx:alpine
|
|
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d
|
|
|
|
COPY --from=builder /usr/src/app/dist/apps/auth /usr/share/nginx/html/auth
|
|
COPY --from=builder /usr/src/app/dist/apps/backend /usr/share/nginx/html/backend
|
|
|
|
EXPOSE 443
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|