22 lines
385 B
Docker
22 lines
385 B
Docker
FROM fascinated/docker-images:node-pnpm-latest
|
|
|
|
ARG APP
|
|
ENV APP=${APP}
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy the app's sourse
|
|
COPY apps/${APP} ./${APP}
|
|
COPY apps/${APP}/package.json ./${APP}/package.json
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile --production
|
|
|
|
# Build the app
|
|
RUN pnpm run build
|
|
|
|
# Expose the port
|
|
EXPOSE 3000
|
|
|
|
# Run the app
|
|
CMD pnpm apps/$APP/dist/index.js |