Skip to content

Commit

Permalink
Merge pull request #536 from iamnithishraja/nithish/improved-docker
Browse files Browse the repository at this point in the history
fixed docker hot reaload on windows
  • Loading branch information
hkirat authored May 12, 2024
2 parents 4faf90a + 1c19998 commit a90e49f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
container_name: cms-docker
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/cms?schema=public
- NEXT_WEBPACK_USEPOLLING=1
ports:
- '3000:3000'
- '5555:5555'
Expand Down
14 changes: 13 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
serverActions: {
allowedOrigins: ['localhost:3000', 'app.100xdevs.com', 'app2.100xdevs.com']
}
}
},
swcMinify: true,
webpack: (config, context) => {
// Enable polling based on env variable being set
if(process.env.NEXT_WEBPACK_USEPOLLING) {
config.watchOptions = {
poll: 500,
aggregateTimeout: 300
}
}
return config
},
};

module.exports = nextConfig;

0 comments on commit a90e49f

Please sign in to comment.