File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
2+ # minimal alpine image for quick dev build
3+ # FROM mhart/alpine-node
4+
5+
6+ FROM node:alpine
7+ WORKDIR /app
8+ COPY . .
9+ RUN yarn install
10+ RUN yarn build
11+ EXPOSE 3000
12+ CMD ["yarn" , "start" ]
13+
14+
15+
16+ # For production environment
17+ # FROM node:alpine as BUILD_IMAGE
18+ # WORKDIR /app
19+ # COPY package.json yarn.lock ./
20+ # # install dependencies
21+ # RUN yarn install --frozen-lockfile
22+ # COPY . .
23+ # # build
24+ # RUN yarn build
25+ # # remove dev dependencies
26+ # RUN npm prune --production
27+
28+ # FROM node:alpine
29+ # WORKDIR /app
30+ # # copy from build image
31+ # COPY --from=BUILD_IMAGE /app/package.json ./package.json
32+ # COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
33+ # COPY --from=BUILD_IMAGE /app/.next ./.next
34+ # COPY --from=BUILD_IMAGE /app/public ./public
35+ # EXPOSE 3000
36+ # CMD ["yarn", "start"]
Original file line number Diff line number Diff line change 1+ version : ' 3.8'
2+ services :
3+ web :
4+ build :
5+ context : ./
6+
7+ volumes :
8+ - .:/app
9+ command : npm run dev
10+ ports :
11+ - " 3000:3000"
12+ environment :
13+ NODE_ENV : development
You can’t perform that action at this time.
0 commit comments