Skip to content

Commit

Permalink
nextjs dev reload fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluder-Paradyne committed May 31, 2023
1 parent 83798d2 commit fb6dbee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ services:
build: ./gui
ports:
- "3000:3000"
volumes:
- ./gui:/app # Add this line
environment:
- NEXT_PUBLIC_API_BASE_URL=http://localhost:8001
networks:
- super_network
volumes:
- ./gui:/app
- /app/node_modules
- /app/.next

super__redis:
image: "redis:latest"
Expand Down
2 changes: 1 addition & 1 deletion gui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:lts

WORKDIR /app

COPY package.json .
COPY package*.json ./
RUN npm install

COPY . .
Expand Down
9 changes: 8 additions & 1 deletion gui/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
assetPrefix: process.env.NODE_ENV === "production" ? "/" : "./"
assetPrefix: process.env.NODE_ENV === "production" ? "/" : "./",
webpackDevMiddleware: config => {
config.watchOptions = {
poll: 1000,
aggregateTimeout: 300,
}
return config
}
}

module.exports = nextConfig

0 comments on commit fb6dbee

Please sign in to comment.