add a docker config for a monolithic app
This commit is contained in:
1 parent
885c63b147
commit
72cd3b592e
5 files changed
+94
No files matched your search
@@ -0,0 +1,25 @@
|
||||
FROM node:20-alpine AS frontend-build
|
||||
|
||||
WORKDIR /app/client
|
||||
|
||||
COPY client/package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY client ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine AS app
|
||||
|
||||
WORKDIR /app/server
|
||||
|
||||
COPY server ./
|
||||
|
||||
COPY --from=frontend-build /app/client/dist ./public
|
||||
|
||||
RUN npm install
|
||||
|
||||
RUN chmod +x ./scripts/inject-vars.sh
|
||||
|
||||
EXPOSE 52345
|
||||
|
||||
CMD ./scripts/inject-vars.sh && node ./index.js
|
||||
Reference in new issue
Block a user