Skip to content

Conversation

@abhinav12222363
Copy link

This PR adds Docker support for the frontend to simplify remote deployment.

A frontend Dockerfile has been added that runs the React Router dev server inside a Docker container and binds it to 0.0.0.0, fixing the issue where port 1420 was inaccessible on remote Linux servers.

@vcfgv
Copy link
Collaborator

vcfgv commented Dec 31, 2025

Thanks for working on this! The changes could effectively solve the host binding issue.

I have a couple of suggestions to optimize the Dockerfile:

  1. Base Image: Since the project uses Bun, I'd recommend using ⁠FROM oven/bun:1-alpine instead of ⁠node:20-alpine. This is more efficient and saves us from having to manually install global bun.
  2. Dev vs. Prod: I noticed the container runs ⁠react-router dev. Just to confirm, is the intention to use this Dockerfile for remote development environments? For production deployment, we typically build the app and serve static files, but this approach works fine for a quick dev setup on a remote server.

Any idea on this? @DigHuang

@abhinav12222363
Copy link
Author

Thanks for the review and the suggestions!

Yes, the intention of this Dockerfile is to support remote development environments, where running react-router dev inside Docker helps quickly expose the frontend on a remote server.

I agree with using the Bun base image — I’ll update the Dockerfile to use oven/bun:1-alpine to simplify the setup and reduce image size.

For production, a build-and-serve approach makes sense, and we can consider adding a separate production Dockerfile or docker-compose setup in a follow-up if needed.

@abhinav12222363
Copy link
Author

I’ve updated the Dockerfile to use the Bun base image as suggested and verified it works locally. Thanks!

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.

2 participants