Created
September 8, 2025 11:26
-
-
Save prabhatthapa/427f863e6acee396e1e98e0776724f28 to your computer and use it in GitHub Desktop.
Run NX mono repo app's standalone version via Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG NODE_VERSION={Add your preferred version number} | |
ARG ALPINE_VERSION=3.21 | |
ARG APP_NAME | |
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} | |
ARG APP_NAME | |
ENV APP_NAME=${APP_NAME} | |
WORKDIR /app | |
COPY next.config.js package.json pnpm-lock.yaml ./ | |
COPY ./patches ./ | |
COPY .next/standalone/ ./ | |
COPY ./public ./apps/${APP_NAME}/public | |
COPY .next/static ./apps/${APP_NAME}/public/_next/static | |
EXPOSE 4200 | |
ENV PORT=4200 | |
ENV HOSTNAME="0.0.0.0" | |
CMD ["sh", "-c", "node apps/$APP_NAME/server.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment