Replies: 15 comments 44 replies
-
Thank you so much for this Sam. For folks watching at home, Sam and I had a great chat about this at Remix Conf and we're going to work on this together to make the setup experience even easier than it is now and have fewer points of failure. Stay tuned! |
Beta Was this translation helpful? Give feedback.
-
Recapping my understanding of what we discussed. Basically, I'm going to go through the current deployment instructions and identify what needs to changed, and by whom. I'm just going to divvy the work between epic stack and fly; for some cases it might make sense to push the changes down into remix, but I'll leave that up to you. Unchanged.
This will be replaced by
I'm of the opinion that epic stack should do this. After all, Rails does this. Furthermore, emitting a .github/workflow without a .git directory doesn't make much sense, but I'm open to discussing this. Either way, this should no longer be a manual step the developer needs to take.
Unchanged.
Unchanged.
Unchanged.
Will be taken care of by fly (probably during first deploy) |
Beta Was this translation helpful? Give feedback.
-
Got to the same point as @rubys running in v2. Any update on how to solve that port 8500 error?
I ran a search for '8500' on the repo and couldn't find anything, so I'm guessing this is a fly thing? UpdatePort |
Beta Was this translation helpful? Give feedback.
-
@andrecasal Try https://community.fly.io/t/new-commands-fly-consul-attach-and-fly-consul-detach/12418 |
Beta Was this translation helpful? Give feedback.
-
Status update: flyctl v0.1.6 now will use dockerfile-node to generate Dockerfiles. What I need now:
|
Beta Was this translation helpful? Give feedback.
-
I'm seeing
when trying to deploy using the |
Beta Was this translation helpful? Give feedback.
-
Hi semi-related issue, but I don't think it requires a separate thread
|
Beta Was this translation helpful? Give feedback.
-
Just because I've been quiet doesn't mean that I haven't been busy. To the contrary, I'm nearly ready. Peruse dockerfile-node/fly.js and compare to epic-stack/docs/deployment.md. I have a few more flyctl changes that I need to test and deploy before I can finish up, but I'm getting close. |
Beta Was this translation helpful? Give feedback.
-
Right now you can pass --region on fly launch, but there is no option to let it default.
It is new!
That's now how it looks for all v2 apps
If epic stack includes a health check endpoint, let me know and I'll gladly add that. I already do this for rails.
I believe that some of the changes are required for apps v2, and I developed this in consultation with Ben Johnson. But to answer your more general question: in general the litefs configuration and dockerfile can't evolve independently, there are too many things that need to be coordinated like file paths. Also litefs is evolving quickly, and there are plans that will require changes to both the Dockerfile and the litefs configuration.... I'm guessing that you are at least partially aware of them as you already added ca-certificates to your Dockerfile. My vision is to have a single repository where you, me, Ben and others directly collaborate. In any case, this code will remain in fly-apps/dockerfile-node to support non-Remix node.js apps.
The exact lines I posted above should work as written. Is this not the case for you? If not, perhaps it is because you still have your personal org set up for apps V1? See: https://community.fly.io/t/make-apps-v2-the-default-for-new-apps-in-your-org/11280
I encourage you to take a moment and review: https://github.com/fly-apps/dockerfile-node/blob/main/fly.js ; see what is being done there, and what might be worth adding. Just be aware that the code there is for all Node applications, not just epic stack, and not just remix. In fact, it works with applications with no framework, see: https://fly.io/blog/vanilla-candy-sprinkles/
I actually flew out to SLC to have this discussion in person. As long as you make an informed decision, that's your choice to make. But first, let's recap: fly recently broke your setup with the change from nomad (v1) to machines (v2). There are recent and known upcoming change to litefs that will be breaking you again. We can work together, and I invited you as a collaborator to fly-apps/dockerfile-node to ensure that things are always working and debug customer issues together, or you can go it alone and I can redirect any complaints your way. I had hoped that I had convinced you in person of the merits of owning this part of the problem jointly, but I'm gathering that I hadn't fully made my case, at least not in a durable way. |
Beta Was this translation helpful? Give feedback.
-
Oh, I just remembered, one of the killer features that you seemed especially interested in, was the ability to run:
See: https://github.com/fly-apps/dockerfile-node#options for the list of current options; and https://community.fly.io/t/new-launch-features-for-node-applications/13271 for background on the more general plans. |
Beta Was this translation helpful? Give feedback.
-
I've now built a custom series of commands to get the Epic Stack deployed on Fly: #119 Feedback and improvements are welcome. Thanks everyone! |
Beta Was this translation helpful? Give feedback.
-
Give this a try: const { execSync } = require('child_process');
const token = execSync('fly auth token', {encoding: "utf8"});
const query = 'query {platform {requestRegion}}';
fetch('https://api.fly.io/graphql', {
method: 'POST',
body: JSON.stringify({ query }),
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
}
})
.then(response => response.json())
.then(response => console.log(response.data.platform.requestRegion)) |
Beta Was this translation helpful? Give feedback.
-
Btw, I am getting this error on a fresh installation of Epic Stack:
How do I resolve this? I don't see any other helpful logs, unfortunately. |
Beta Was this translation helpful? Give feedback.
-
I've created a new project using Epic Stack and ran into an issue on the deployment step of the github action
This seems to be fixed by renaming Not sure where that postfix came from and just wanted to raise it here if its not an isolated incident. |
Beta Was this translation helpful? Give feedback.
-
I tried deploying a fresh build and see this, a little unrelated but I already have a couple of apps on fly.io that work fine.
|
Beta Was this translation helpful? Give feedback.
-
Disclosure: my name is Sam Ruby and I work for fly.io.
I'm pleased to see that fly.io is included in this opinionated stack, and I want to make it seamless.
After seeing the announcement, I tried the instructions for myself, and have yet to succeed. Following are my notes. The first few problems are easy fixes, and I actually want the opportunity to propose that I make changes to how fly.io works and the instructions be updated (mostly deletions!) to match.
Fir failure:
Result:
Of course it is. Changed to
rubys-epic-stack
, andrubys-epic-stack-staging
.Subsequent commands also need to use the selected name:
Also need to do the same in
fly.toml
:First deploy:
That's not good. Two problems here. First:
region: ,
is missing a region name. Second: note that fly will now automatically allocate a volume for you on first deploy, so this can be removed as an earlier step.The fix is to replace the
fly.toml
. Here's what the new file should look like:Note how it is much smaller. It includes a primary region. (Sidenode: how should epic stack pick this? Answer: it shouldn't, see below!). It also exposes new features, like automatically stopping and starting machines. And contains the mount which causes the volume to automatically be created.
Next deploy:
Here I am going to need some help. I don't know (yet!) what the epic stack is expecting to be listening on port 8500.
Recap/proposal
Getting to this point requires a number of manual running of commands and updating of configuration files. That's something that a script can handle. What I would like to do is replace all of the above with
fly launch
. It will prompt for an application name. It will prompt for a region. Normally it would also prompt for postgres and redis, but when I detect an epic stack, I can make sure that those prompts are skipped.Normally it would also generate a Dockerfile for you, but I can (for now) skip that too. TBH, I would love to have a follow-on discussion and have dockerfile-node generate the dockerfile for you, the primary advantage being that it can be rerun with different options or after you have installed additional packages and it will either show you the necessary diffs or even update your Dockerfile for you.
Beta Was this translation helpful? Give feedback.
All reactions