Skip to content

Conversation

@germanfica
Copy link

This PR adds a production-ready Docker setup:

  • Multi-stage Dockerfile with Node.js 20 (slim) for build and Nginx (alpine) for runtime
  • docker-compose.yml for local orchestration
    • Builds the app from the Dockerfile
    • Maps host port 8080 to container port 80
    • Sets NODE_ENV=production

- Add multi-stage Dockerfile:
  - Build stage with Node.js 20 (slim image)
  - Runtime stage using Nginx (alpine image)
- Add docker-compose.yml for local orchestration:
  - Build service from Dockerfile
  - Expose container on port 5173 mapped to port 80
  - Set NODE_ENV to production
- Update docker-compose.yml:
  - Change port mapping from 5173:80 to 8080:80
- Use 8080 as a more conventional host port for production web servers
- Avoid confusion with Vite's default dev port (5173)
@germanfica
Copy link
Author

Hi! I opened this PR to add a production-ready Docker setup. Hope it's useful, and happy to adjust anything if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant