Skip to content

Commit 939ff1c

Browse files
authored
Merge pull request #59 from UTNkar/chores/add-hot-reloading
chores: Add hot reloading in docker
2 parents 3377081 + 4cef257 commit 939ff1c

File tree

5 files changed

+66
-5
lines changed

5 files changed

+66
-5
lines changed

.dockerignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Dependencies
2+
node_modules
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
frontend/apply/node_modules
7+
8+
# Python
9+
__pycache__
10+
*$py.class
11+
.Python
12+
backend/venv
13+
backend/env
14+
*.egg-info
15+
dist
16+
17+
# Next.js
18+
.next
19+
.next/
20+
out/
21+
frontend/apply/.next
22+
23+
# Testing
24+
coverage
25+
.coverage
26+
htmlcov
27+
28+
# IDE
29+
.vscode
30+
.idea
31+
*.swp
32+
*.swo
33+
*~
34+
35+
# OS
36+
.DS_Store
37+
Thumbs.db
38+
39+
# Git
40+
.git
41+
.gitignore
42+
.gitattributes
43+
44+
# Environment
45+
.env
46+
.env.local
47+
.env.*.local
48+
49+
# Logs
50+
*.log

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
__pycache__
33
.vscode
44
.env
5-
venv
5+
venv
6+
.claude
7+
.idea
8+
.junie
9+
.cursor
10+
.DS_Store

docker-compose.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,18 @@ services:
3333
frontend:
3434
build:
3535
context: .
36-
dockerfile: frontend.Dockerfile
36+
dockerfile: frontend.Dockerfile
3737
container_name: nextjs_frontend
3838
depends_on:
39-
- backend
39+
- backend
4040
ports:
4141
- "3000:3000"
42+
volumes:
43+
- ./frontend/apply:/app
44+
- /app/node_modules
45+
environment:
46+
- WATCHPACK_POLLING=true
47+
- CHOKIDAR_USEPOLLING=true
4248
command: ["npm", "run", "dev"]
4349

4450
volumes:

frontend/apply/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
/* config options here */
4+
/* config options here */
55
};
66

77
export default nextConfig;

frontend/apply/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev --turbopack",
6+
"dev": "next dev --turbopack --hostname 0.0.0.0",
77
"build": "next build",
88
"start": "next start",
99
"lint": "next lint",

0 commit comments

Comments
 (0)