Is it a good idea to containerise a frontend (react) application?

Would it be a good idea to containerise a frontend application with nginx (like the example below) with another nginx instance (running on the server) acting as a reverse proxy?

I was thinking of doing this for my portfolio website and another project on the same VPS but it seemed wasteful to have three nginx instances (one as the reverse proxy and the other two serving the frontend for the two applications in containers) running?

Example snippet from compose file: nginx: image: nginx:latest restart: always ports: - '8080:8080' volumes: - ./build:/srv/www - ./default.conf:/etc/nginx/conf.d/default.conf depends_on: - api

submitted by /u/niix1
[link] [comments]
Source: Reddit