File tree Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Common variables
2
2
BUILD_ENV = dev
3
3
4
+ # Frontend variables
5
+ FRONTEND_PORT = 3000
6
+
4
7
# Question service variables
5
- QUESTION_SVC_PORT = 8001
8
+ QUESTION_SVC_PORT = 8000
6
9
QUESTION_SVC_DB_URI =
7
10
8
11
Original file line number Diff line number Diff line change 1
1
services :
2
+ frontend :
3
+ build :
4
+ context : ./frontend
5
+ target : $BUILD_ENV
6
+ ports :
7
+ - $FRONTEND_PORT:$FRONTEND_PORT
8
+ depends_on :
9
+ - question-service
10
+ - user-service
11
+
2
12
question-service :
3
13
build :
4
14
context : ./question-service
Original file line number Diff line number Diff line change
1
+ node_modules
2
+ .next
Original file line number Diff line number Diff line change
1
+ # Build stage
2
+ FROM node:20-alpine AS base
3
+ WORKDIR /app
4
+ COPY package.json yarn.lock ./
5
+ RUN yarn install --frozen-lockfile
6
+
7
+ # Development stage
8
+ FROM base AS dev
9
+ COPY . .
10
+ CMD ["yarn" , "dev" ]
11
+
12
+ # Production build stage
13
+ FROM base AS build
14
+ COPY . .
15
+ RUN yarn build
16
+
17
+ # Production runtime stage
18
+ FROM build AS prod
19
+ CMD ["yarn" , "start" ]
You can’t perform that action at this time.
0 commit comments