Skip to content

Commit

Permalink
Add Dockerfile, Add MongoStore for sessions and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsingh132 committed Oct 18, 2024
1 parent 6ef7928 commit 52dd982
Show file tree
Hide file tree
Showing 13 changed files with 4,586 additions and 4,173 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $APPDATA
/build

# misc
.vscode
.DS_Store
.env
.env.local
Expand Down
24 changes: 24 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.env.development.local
.env.test.local
.env.production.local
node_modules
node_modules
.vercel
24 changes: 24 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:lts-alpine AS base

FROM base AS deps
WORKDIR /app
COPY package*.json ./
RUN npm install --production --silent

FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

FROM base AS runner
WORKDIR /app
COPY --from=builder /app ./
ARG FRONTEND_URL
ENV FRONTEND_URL=${FRONTEND_URL}

EXPOSE 5000

RUN chown -R node /app

USER node
CMD ["node", "server.js"]
Loading

0 comments on commit 52dd982

Please sign in to comment.