Skip to content

Instantly share code, notes, and snippets.

@enriquesaid
Last active October 24, 2023 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save enriquesaid/b5bab1894421f90d5a9048e88460dc8a to your computer and use it in GitHub Desktop.
Save enriquesaid/b5bab1894421f90d5a9048e88460dc8a to your computer and use it in GitHub Desktop.
services:
web:
build: .
command: npm start
ports:
- "3000:4321"
volumes:
- "./:/app"
- "/app/.tscache"
- "/app/dist"
- "/app/node_modules"
FROM node:20-alpine as build
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
FROM httpd:2.4 as runtime
COPY --from=build /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