epicweb-dev / epic-stack

This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea.
https://www.epicweb.dev/epic-stack
MIT License
4.32k stars 355 forks source link

specify Dockerfile and .dockerignore in fly.toml #747

Closed zwhitchcox closed 3 months ago

zwhitchcox commented 3 months ago

Moving the Dockerfile and .dockerignore is not ideal, as if the process gets interrupted, they will not be moved back to the correct location.

Utilize the dockerfile and ignorefile fly.toml options to specify the location of the Dockerfile and .dockerignore.

Test Plan

I tested this in my own project to make this works as expected.

Checklist

~- [ ] Tests updated~ see above

zwhitchcox commented 3 months ago

dockerignore file isn't working correctly.

zwhitchcox commented 3 months ago

I think this is an upstream issue with flyctl. I think the files are ignored, but the build process is taken over by grpc, and it doesn't honor the .dockerignore option while the files are being transferred to the build machine.

So, the files probably are ignored (I assume) in the actual build context, but you still transfer your full directory to the builder, which is ~1GB just in node_modules, so it's going to significantly increase the deploy time.

I opened a community support ticket, so maybe they will be able to shed some more light.