remix-run / indie-stack

The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.
https://remix.run/stacks
MIT License
1.09k stars 312 forks source link

fix: add swapfile #232

Closed MichaelDeBoey closed 1 year ago

MichaelDeBoey commented 1 year ago

Just like @kwigley's https://github.com/remix-run/blues-stack/pull/183

Fixes #200

mikeybinns commented 1 year ago

I understand the need for the swapfile, but can this be implemented using the swap_size_mb fly.toml option as a cleaner solution than requiring a shell script? Documented here: https://fly.io/docs/reference/configuration/#swap_size_mb-option

MichaelDeBoey commented 1 year ago

@rubys if that's the case, I guess we can simplify dockerfile-node as well?

rubys commented 1 year ago

@MichaelDeBoey yes that is correct. And dockerfile-node already has support for this: https://github.com/fly-apps/dockerfile-node/commit/d489e3a56ab1d30763ae727a32da03a476513c73 ... and if you check the test cases you will see that this already is enabled and tested for indie and blues stacks.

Any chance remix could consider switching to dockerfile node?

MichaelDeBoey commented 1 year ago

@rubys if we can support everything that's happening right now in the Dockerfile, I'd be happy to accept a PR that changes docs and CI & removes the current version of Dockerfile, fly.toml, ... in both indie-stack & blues-stack

rubys commented 1 year ago

I believe we can support everything. If we discover something that needs to be added that can be done quickly, so I'm not worried about that.

The doc changes should be pretty straightforward. Much of the current README can be replaced by fly launch.

The CI will likely take several iterations to get right. I've already got a test that builds the Dockerfile. Example: https://github.com/fly-apps/dockerfile-node/actions/runs/5933428308/job/16088842745

If looks like your existing test deploys the app on fly.io. It doesn't create the application, so it presumes that the app is already present?

So the next step is presumably to figure out what test is needed, subtract out what is already covered, and then write a test for what remains. Whether that test or tests resides in a remix repository or a fly apps repository doesn't matter to me.

MichaelDeBoey commented 1 year ago

@rubys Let's continue the discussion in #252