mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 07:24:55 +00:00
Docerizing and proxying the microservices
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
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;"]
|
||||
Reference in New Issue
Block a user