Comments (9)
The apps are under the Remix fly account.
I have no issues with any changes to this stack so long as it works and is as simple or simpler
from indie-stack.
One modification I always make to my build is to delete certain routes on deploy in the Dockerfile just before build, without deleting them locally / in the git repo. On route convention v1, this was a "_test" folder, and on route conventions v2, it's any files that start with _test.
. This provides me a way to create a helpful for testing route, but ensure it doesn't leak onto production builds.
Is there a way to do this kind of code manipulation with dockerfile-node
? Obviously if not, I don't expect for this to block any implementation, I'm just not 100% clear how dockerfile-node
will work with regards to edits like this.
In case this isn't clear, this is the "Build the app" code from the Dockerfile for routes v2:
from indie-stack.
I have no issues with any changes to this stack so long as it works and is as simple or simpler
@kentcdodds The purpose of @rubys' suggestion is to have less files in the stack/project and let fly launch
/dockerfile-node
do the heavy stuff that's needed for deploying to Fly
from indie-stack.
One modification I always make to my build is to delete certain routes on deploy in the Dockerfile just before build
I would suggest putting this in .dockerignore
?
In any case, the answer is yes: dockerfile-node
is just a bunch of ejs templates, and it would be no problem to add something like:
<% if (remix) { -%>
# remove test route files from non-local builds
RUN if [ ... ] then ... fi
<% } -%>
from indie-stack.
@rubys I would suggest to support this in a generic way, like the extra dependencies that can be installed for certain stages of Dockerfile
from indie-stack.
I would suggest putting this in .dockerignore?
omg 🤦 I can't believe I didn't think of this... This definitely would be a much easier way to do this for my use case.
I would suggest to support this in a generic way
I agree with this, I was mainly giving my use-case only an example, and I'm sure there's other things people may want to do just before or after a build.
Maybe you could provide a way to hook into the process at certain points, e.g. before_build, after_build, after_deploy where uses can execute code. I don't know anything about ejs, but seeing as it's just JS, maybe you can make it possible to just provide a function which accepts parameters like buildFiles, context, buildArgs?
from indie-stack.
Maybe you could provide a way to hook into the process at certain points, e.g. before_build, after_build, after_deploy where uses can execute code. I don't know anything about ejs, but seeing as it's just JS, maybe you can make it possible to just provide a function which accepts parameters like buildFiles, context, buildArgs?
Good news. Take a look at the current set of options: https://github.com/fly-apps/dockerfile-node#options
--instructions
lets you specify a file to inserted in one of three places in the Dockerfile--arg
lets you specify build args
Can you describe what you mean by buildFiles
and context
? If those are generic, they can be added as flags and can benefit all node applications, not just remix ones.
from indie-stack.
Ah amazing :) yeah I think that was exactly what I was envisioning, sorry next time I'll do a deeper dive into the documentation :)
Don't worry about those parameters as they are likely irrelevant with your current way of doing things :)
from indie-stack.
In case this doesn't go ahead for whatever reason, there's some other updates required for the fly.toml.
As far as is documented, allowed_public_ports
and auto_rollback
are not valid parameters. I discovered this because "auto_rollback" didn't do anything when I accidentally deployed a bad build.
To replace auto_rollback
, we should set a deploy strategy as shown here:
[deploy]
strategy = "bluegreen"
https://fly.io/docs/reference/configuration/#picking-a-deployment-strategy
from indie-stack.
Related Issues (20)
- Fly Instance runs out of memory on deployment HOT 11
- Failed app run HOT 3
- Missing Environment Variables when Prisma is removed HOT 3
- Env variables undefined in build but fine in dev HOT 1
- pnpm is not preinstalled and causes an error in Cypress HOT 3
- No region defined in the fly deploy command, causes deployment to crash HOT 10
- Remix and Cypress hydration problem HOT 7
- hydration failed,and css file will request twice HOT 1
- npm run dev errors out in windows machines with "Cannot find module '--require/package.json'"
- Error during deployment in Fly.io, Dockerfile needs to give permissons to `start.sh` script HOT 3
- Timeout when Running e2e tests on a fresh installation
- Typecheck fails because it can't find definitions for cypress or @testing-library/cypress HOT 6
- throw new Error(`Failed to kill process ${pid}: ${error}`) after code change HOT 3
- Tailwind SourceMap/EsBuild Issue HOT 4
- Error upon deployment: you must be authenticated
- Cypress custom commands doesn't load HOT 2
- Deployment in Fly.io crashes with JavaScript heap out of memory HOT 5
- bun breaks deploy HOT 2
- Initial commit will not deploy HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indie-stack.