File tree Expand file tree Collapse file tree 3 files changed +80
-0
lines changed Expand file tree Collapse file tree 3 files changed +80
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Ignore node_modules and logs
2
+ node_modules
3
+ npm-debug.log
4
+ yarn-debug.log
5
+ yarn-error.log
6
+ .pnpm-debug.log
7
+ package-lock.json.backup
8
+
9
+ # Ignore local development settings
10
+ .env.local
11
+ .env.development.local
12
+ .env.test.local
13
+ .env.production.local
14
+
15
+ # Ignore build output
16
+ .next
17
+ out
18
+ build
19
+
20
+ # Ignore IDE and editor config
21
+ .vscode /
22
+ .idea /
23
+ * .swp
24
+ * .swo
25
+ * .tmp
26
+ .DS_Store
27
+ * .bak
28
+
29
+ # Ignore miscellaneous
30
+ coverage
31
+ * .log
32
+ * .pid
33
+ * .seed
34
+ * .sqlite
35
+ * .tgz
36
+ .cache
37
+ * .tsbuildinfo
38
+
39
+ # Ignore Docker-related files that should not be copied into the image
40
+ Dockerfile *
41
+ docker-compose. *
Original file line number Diff line number Diff line change
1
+ FROM node AS base
2
+ WORKDIR /app
3
+ RUN npm i -g pnpm
4
+ COPY package*.json .
5
+
6
+ RUN pnpm install
7
+
8
+ COPY . .
9
+
10
+ FROM node as release
11
+ WORKDIR /app
12
+ RUN npm i -g pnpm next
13
+ RUN npm install -g tailwindcss postcss autoprefixer
14
+
15
+ COPY --from=base /app/node_modules ./node_modules
16
+ COPY --from=base /app/package.json ./package.json
17
+ COPY --from=base /app/.next ./.next
18
+ COPY --from=base /app/app ./app
19
+ COPY --from=base /app .
20
+
21
+ EXPOSE 3000
22
+
23
+ CMD ["pnpm", "dev"]
Original file line number Diff line number Diff line change
1
+ services :
2
+ dev :
3
+ build :
4
+ context : .
5
+ dockerfile : Dockerfile.dev
6
+ container_name : demo-nextjs-dev
7
+ environment :
8
+ - WATCHPACK_POLLING=true
9
+ volumes :
10
+ - .:/app
11
+ - /app/node_modules
12
+ - /app/.next
13
+ ports :
14
+ - " 3000:3000"
15
+ env_file :
16
+ - .env
You can’t perform that action at this time.
0 commit comments