proxy/Dockerfile

22 lines
385 B
Docker
Raw Normal View History

2023-11-16 11:56:52 +00:00
FROM fascinated/docker-images:node-pnpm-latest
2023-11-16 12:54:49 +00:00
ARG APP
2023-11-16 12:58:48 +00:00
ENV APP=${APP}
2023-11-16 12:54:49 +00:00
2023-11-16 12:32:38 +00:00
WORKDIR /usr/src/app
2023-11-16 13:02:02 +00:00
# Copy the app's sourse
2023-11-16 13:09:43 +00:00
COPY apps/${APP} ./${APP}
2023-11-16 13:11:02 +00:00
COPY apps/${APP}/package.json ./${APP}/package.json
2023-11-16 12:32:38 +00:00
2023-11-16 13:09:43 +00:00
# Install dependencies
RUN pnpm install --frozen-lockfile --production
2023-11-16 13:03:59 +00:00
2023-11-16 13:09:43 +00:00
# Build the app
RUN pnpm run build
# Expose the port
2023-11-16 11:56:52 +00:00
EXPOSE 3000
2023-11-16 12:32:38 +00:00
2023-11-16 13:09:43 +00:00
# Run the app
2023-11-16 12:58:48 +00:00
CMD pnpm apps/$APP/dist/index.js