Skip to content

Commit

Permalink
feat(client): Add services to docker-compose for hot-reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-cronic committed Oct 20, 2024
1 parent 3ecc2a5 commit 5632ab9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ RUN npm ci --production=false

COPY . .

CMD npm run build:prod
CMD npm start
9 changes: 9 additions & 0 deletions client-admin/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ module.exports = (env, options) => {
},
},
**/

port: 3000,
proxy: [
{context: ['/api'],
target: 'http://127.0.0.1:5000/',
secure: false,
changeOrigin: true,
}
]
},
plugins: [
new CopyPlugin({
Expand Down
18 changes: 18 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,21 @@ services:
# live-code-reloaded ports
# * leave the server pointing to the static builds, but have separate ports you can hit for the live-code
# reloading (making sure to document the process)

client-admin:
build:
context: ./client-admin
dockerfile: Dockerfile
args:
NODE_ENV: development
environment:
CHOKIDAR_USEPOLLING: "true"
volumes:
- ./client-admin:/app
- /app/node_modules
ports:
- "3000:3000"
networks:
- "polis-net"


0 comments on commit 5632ab9

Please sign in to comment.