refactoring

This commit is contained in:
2025-01-31 09:27:31 -06:00
parent 986d23b2f6
commit a12985922f
31 changed files with 12142 additions and 17099 deletions

View File

@@ -1,18 +1,39 @@
FROM --platform=linux/amd64 node:18-alpine AS base
# FROM --platform=linux/amd64 node:18-alpine AS base
# ENV PNPM_HOME="/pnpm"
# ENV PATH="$PNPM_HOME:$PATH"
# RUN corepack enable
# FROM base AS api
# COPY /api/dist /app/dist
# COPY /api/node_modules /app/node_modules
# WORKDIR /app
# EXPOSE 3000
# # CMD ["node", "dist/main.js"]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
# FROM base AS app
# COPY /app/dist /app/dist
# WORKDIR /app
# RUN npm i -g serve
# EXPOSE 8080
# CMD [ "serve", "-s", "/dist", "-p", "8080" ]
FROM node:18-slim AS base
FROM base AS api
COPY ./api/dist ./api/dist
COPY ./api/node_modules ./api/node_modules
WORKDIR api
COPY ./.prod/api .
EXPOSE 3000
CMD ["node", "/api/dist/main.js"]
CMD ["node", "dist/main.js"]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
FROM base AS app
WORKDIR /app
COPY ./.prod/app .
RUN npm i -g serve
# WORKDIR ./app
COPY ./app/dist ./app/dist
# COPY ./app .
# RUN npm install
EXPOSE 8080
CMD [ "serve", "-s", "app/dist", "-p", "8080" ]
# CMD ["npm", "run", "dev"]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
CMD [ "serve", "-s", "dist", "-p", "8080" ]