-
Notifications
You must be signed in to change notification settings - Fork 1
feat: updates for remix 1.19.3 #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
First question: what are the playwright tests? I couldn't find any such tests in the repo. Second question: I'm trying to set up an example app for some manual testing, but I'm getting stuck very early on:
Example app here: https://github.com/brettdh/serverless-remix/tree/feat/version-bump-with-example-app/example Based on the "just the basics" output of |
Ok I might be confused and just figuring out that the |
The answer to the first question is that I just tried to merge everything from the origin, comments and all. In this case the Architect adapter is the origin so the updated comment that is changed is also reflected in their source. 😊 https://github.com/remix-run/remix/blob/30bcd9e9dfbeda1707329da017f9ceccfac21521/packages/remix-architect/__tests__/server-test.ts#L18 Regarding the second question when running your code two things comes to mind.
Both approaches will require you to build |
The example app is a separate npm package, so I figured that would be fine. I was using I've also tried this with an example app outside of the serverless-remix tree, but I got the same result. |
Whoops, I overlooked this detail in the serverless-remix readme:
(emphasis mine) The default setup for this runs |
Spent some more time on this today, but when I go to test this in AWS, the resulting zipfile is over 300MB, and AWS rejects it. Is there something special that Architect is doing to avoid this? I also tried using |
Hmm... upon further searching around:
so maybe that's the way this has to go? Have you seen zipfile-too-large with prior versions of Remix? |
@brettdh I'm just coming to this conversation now, but am interested in a similar setup. I'd like to get remix running on lambda, deployed using serverless, and probably talking to an RDS instance. I would recommend looking into Lambda Layers, which allows you to drastically reduce the size of your build by moving your dependencies elsewhere. |
@cayblood thanks for the reply. I did attempt using a lambda layer for node_modules, but this still hit a size limit. However, serverless-esbuild is working for me now, which has let me move on to the real issue: remix-mount-routes, as @andersquist originally said would be the case. 🙂 |
@brettdh is support for |
@brettdh would you be willing to share an example repo with your work so far? |
From #137 (comment):
We are using custom domains for only some of our envs, so we need the ability to serve from a path like
My understanding is that
I'm working on an example app to add to this repo, which I hope to push tomorrow or later this week. |
I found an update from the author of
This matches what I see when trying to use I've started looking at The example setup linked from the same discussion above might be a promising approach - though we won't use nginx, API Gateway is doing something similar by serving the app with and without the |
Forgive the repetition, but shouldn't lambda layers also bundle everything in
Thanks! |
The key detail is that there is also a maximum compressed size for a lambda layer:
|
Cool! Do you think there would be a benefit in combining both approaches? Does |
One could probably do something like that with esbuild using chunks, as suggested in the example linked here: evanw/esbuild#2321
The current build of my barebones example app (based on the grunge stack) is 2.7 MB. While this is just below the limit of 3 MB, it's probably not something you'd want to edit most of the time, even in its non-minified state. Getting the node_modules deps into a layer would help, but editing esbuild-bundled code is generally not a great dev experience. Luckily, esbuild and the deploy are pretty fast. |
Ok, good news and bad news.
Once I came to the point of needing to have the optional base path (which is specific to API Gateway v1) as part of the Remix app, rather than managed by the adapter, I took that moment as a good time to step back and revisit the API Gateway v2 approach, which my team had considered initially but had tabled as too complicated. When I returned to it, though, I was able to get it working within a day. I still think there's a place for a plugin like serverless-remix, particularly if it can deal with the above API Gateway v1 complexity so that app authors don't have to. For my immediate purposes, though, I'm moving forward with API Gateway v2. |
Thanks for sharing this, @brettdh. It will be a huge help to be able to benefit from your diligent efforts. |
@brettdh if you have a moment, please push your starter project to a git repo once you get it working. It would be nice have an easy-to-follow of remix 2 running on AWS. I am working on adapting the grunge stack to use RDS, as I don't want to use DynamoDB. |
Sorry if I was unclear. I'm not currently doing any more work on the WIP starter project, since I'm not continuing in the serverless-remix direction; I pushed it in case others want to take it from there. The commit message has some next steps that I would have been looking into had I continued. |
@brettdh I was mostly confused because the "example setup" you linked to was also a serverless project. Are you saying you just created a grunge stack app and then deployed it without serverless? If so, how did you deploy it? I took a look at AWS architect (used in the grunge stack) but it seemed to require DynamoDB, while I would prefer to use RDS postgres or something that at least has SQL support. |
When I wrote this:
I meant that I'm just using the architect adapter, which is probably misnamed. I'm deploying the lambda (which uses that adapter, by way of FWIW, architect supports RDS in the same way that serverless does - via custom cloudformation resources. |
As I mentioned there are issues when using
remix-mount-routes
that are unresolved. My guess it that it is both build and runtime related.Eslint-config and tsconfig were updated to match those in the Remix repo.