How to improve deployment time?

Hi there, I’m deploying a Remix.run application and noticed that the deployment process is taking a lot longer than my previous setup with Vercel. Currently, it’s 5min+ with Fly.io and 1min30s with Vercel.

I’m not super familiar with Docker and just slightly modified the default Dockerfile from Remix.run template.

Would appreciate any help to optimize this process a bit further! Please let me know if there’s any other information I can provide.

Thanks all!

Do you have a local build directory like build or public/build? If so, you can add them to .dockerignore to improve deploy times.

1 Like

Yes, I do. Let me try that and get back to you!

I’m curious how ignoring those directories would increase deploy time. Fewer things in the image → less time on network uploading and downloading?


Update: thanks @joshua, that did the trick, deployment is so much faster now!

Hi @alexluong,

That’s right: everything in the image gets pushed to the registry on deploy, and it has to get pulled to the worker machines that will run the app. The less extra stuff in there, the less time to move everything across the network. Data also gets compressed on Docker pushes and decompressed on pulls, which can eat significant time itself.

1 Like