Skip to content

Commit

Permalink
Merge pull request #36 from brendantwh/containerize
Browse files Browse the repository at this point in the history
Containerize user service
  • Loading branch information
JohnChia123 authored Oct 6, 2024
2 parents cbae288 + 06254c3 commit 8478c94
Show file tree
Hide file tree
Showing 2,241 changed files with 344 additions and 349,116 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.env
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions backend/user-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
13 changes: 13 additions & 0 deletions backend/user-service/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:22-alpine3.19 AS builder
WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci
COPY . .

ENV HOSTNAME="0.0.0.0"
ENV PORT=3001

EXPOSE 3001

CMD ["npm", "start"]
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
445 changes: 320 additions & 125 deletions user-service/package-lock.json → backend/user-service/package-lock.json

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 9 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ services:
build:
context: ./frontend
dockerfile: Dockerfile.dev
# depends_on:
# -
ports:
- "3000:3000"
develop:
Expand All @@ -19,12 +17,19 @@ services:
build:
context: ./backend/question-service
dockerfile: Dockerfile.dev
# depends_on:
# -
ports:
- "2000:2000"
develop:
watch:
- action: sync
path: ./backend/question-service
target: /app

user:
build:
context: ./backend/user-service
dockerfile: Dockerfile.prod
env_file:
- ./backend/user-service/.env
ports:
- "3001:3001"
1 change: 0 additions & 1 deletion user-service/node_modules/.bin/color-support

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/mime

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/mkdirp

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/node-pre-gyp

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/nodemon

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/nodetouch

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/nopt

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/rimraf

This file was deleted.

1 change: 0 additions & 1 deletion user-service/node_modules/.bin/semver

This file was deleted.

Loading

0 comments on commit 8478c94

Please sign in to comment.