-
Notifications
You must be signed in to change notification settings - Fork 980
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
[Bug?]: rw data-migration looks for src folder #8059
Comments
If I copy the whole api folder (not just dist and needed files) I end up with this error
|
Seems like that's caused by running |
It would be neat, if this would work more like Right now I can use prisma like this in docker
I guess it's also reading env vars. |
@razzeee I think an easy solution is to add an optional path to the dataMigrate command
Might this work for your case? If so, would you be interested + available to work on implementing it? |
It's more complex.
|
If you're installing As you know, we're working on resolving cases like this (i.e. deploy steps build, prisma, data, serve) for Docker via the in-motion Container Working Group. Thank you for adding your comment to the post! Looping in @jtoar and @Josh-Walker-GM as an FYI about this being a good use-case. |
I don't think your correct, I did always install this
and then run When I was still doing |
@thedavidprice I met with @razzeee a few weeks ago and he showed me this problem. The issue is that |
@jtoar do I need to copy the migration folder in addition to the dist folder? I don't think the dist contains them? (I find this a bit confusing/unexpected) |
The command still expects the dataMigrations folder to be there in @razzeee I could add another flag for |
I can copy that easily I guess, I just trimmed the code down as much as before and forgot about the migration folder/thought it might be in the dist. As I copied the whole api folder before. |
@razzeee let me know if that works for you if not I can totally add the flag, but yeah it's going to have to be copied manually one way or another since it's not in src and build won't move it over |
After copying the migrations over I run into this:
Which I guess I can circumvent, but I'm not sure if that's expected @jtoar |
@jtoar ^^ I believe this is the same package missing from my Storybook tests, correct? |
@thedavidprice it sounds similar but I don't remember the exact package, I still haven't looked into, will try to do that today. The similarity between this issue and that issue is missing packages, but they're missing in this issue because we're in a Dockerized environment where we're deliberately trying to remove packages to make a small image. The case you saw may just be a mistake on our part, but again I need to look into it. @razzeee here's what I think is going on... the But it's more unfortunate than that... Anyway none of that is good news. I'm trying to isolate data migrate as a command here; maybe I can fix the issues in that PR by bundling everything: #8572 I'll report back when I've actually run this successfully in a Docker container this time |
What's not working?
I'm trying to run
rw data-migration
from our CI after copying the files over to the docker container.It complains about the files not being in
/app/api/src/lib/db
, which is correct.As I copied them to
/app/api/db
and would like to keep it like that, as that's the git path and similar to the schema migrations.How do we reproduce the bug?
Build a docker container with both api and web in one container, like in the examples.
Install redwood like this at some point
Try to run your data migrations, in my case I added this line
rw data-migrate up
to my
run.sh
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: