-
-
Save arthurgeek/c7f81f728d6aef1cf6750f8a692d71f7 to your computer and use it in GitHub Desktop.
This file contains 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
node_modules |
This file contains 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
services: | |
web: | |
build: | |
context: . | |
target: development | |
ports: | |
- "3000:4321" | |
volumes: | |
- "./:/app" | |
- "/app/.tscache" | |
- "/app/node_modules" |
This file contains 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
FROM node:20-alpine as development | |
WORKDIR /app | |
COPY package*.json . | |
RUN npm install | |
COPY . . | |
EXPOSE 4321 | |
CMD [ "npm", "run", "start" ] | |
FROM development as builder | |
WORKDIR /app | |
RUN npm run build | |
FROM nginx:1.25.2-alpine-slim as production | |
COPY --from=builder /app/dist /usr/local/apache2/htdocs/ | |
EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment