Skip to content

Commit

Permalink
Merge pull request #7 from drawn-app/feature/dockerfile
Browse files Browse the repository at this point in the history
Docker file
  • Loading branch information
pineylilly authored Nov 2, 2024
2 parents 83b4142 + 6336a83 commit a0b99ba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
Dockerfile
.dockerignore
proto/generatedTypes/
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Stage 1: Build the application
FROM node:20.11.0-alpine AS build

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY . .
RUN npm run proto:gen
RUN npx prisma generate

# Stage 2: Run the application
FROM node:20.11.0-alpine AS prod

WORKDIR /app

COPY --from=build /app /app

EXPOSE 8082

CMD ["npm", "run", "dev"]

0 comments on commit a0b99ba

Please sign in to comment.