R
Railwayā€¢15mo ago
alexbalandi

Forking environment with PostgressSQL template on hobby plan leading to all sorts of issues

At first the container just didn't deploy, but then when i tried manually removing/creating it, my "production" environment got messed up and container there got disabled. Steps to replicate would be creating env with postgress template, deployin it and then forking it
74 Replies
Percy
Percyā€¢15mo ago
Project ID: N/A
alexbalandi
alexbalandiOPā€¢15mo ago
N/A
Duchess
Duchessā€¢15mo ago
Thread has been flagged to Railway team by @Brody.
Brody
Brodyā€¢15mo ago
project id is applicable, please provide it
jr
jrā€¢15mo ago
Thank you for this flag. We are actively working on it
alexbalandi
alexbalandiOPā€¢15mo ago
f96e9e13-9c55-4a12-ba6e-9962cbb6d4cb Ye, really messed things up for me. Just after I told a reddit user a certain community-driven db is up again šŸ˜… right now trying to spin again from template and it for some reason creates a plugin (??) instance on deploy and throws error. Sorry for erratic report, i'm kinda trying to patch it up asap
alexbalandi
alexbalandiOPā€¢15mo ago
this is how it looks after me deleting stuff and trying to spin up again
No description
alexbalandi
alexbalandiOPā€¢15mo ago
But the weirdest thing were "Postgress" plugin-like windows appearing in original env when I tried to deploy them on forked. And yes, I guess one of my mistakes was that after I deleted postgress in forked env (because it refused to deploy), I tried to spin up a postgress plugin rather than template in forked env
alexbalandi
alexbalandiOPā€¢15mo ago
yup, no deploy (no secrets exposed here, so whatevs)
No description
jr
jrā€¢15mo ago
This is not your fault at all. It is on us and will be fixed soon. There are no plugins involved, just a bit of a confusing situation I'll report back when everything is fixed šŸ™‚
alexbalandi
alexbalandiOPā€¢15mo ago
Okay, I'll stop trying to panic recreate databases in different ways and wait for feedback from you šŸ˜…
jr
jrā€¢15mo ago
This should be all fixed now
alexbalandi
alexbalandiOPā€¢15mo ago
Ty, I'll try thiings out. Is forking also safe now?
jr
jrā€¢15mo ago
yes all safe. Still some rough edges in terms of UX that we are going to work on. But your databases will get created
alexbalandi
alexbalandiOPā€¢15mo ago
That's great, thank you! oh, postgress template got removed?
alexbalandi
alexbalandiOPā€¢15mo ago
can't see it in New -> Templates, but k
Brody
Brodyā€¢15mo ago
refresh?
No description
alexbalandi
alexbalandiOPā€¢15mo ago
hmm, will try to clear cache i guess CeciliaHmm
alexbalandi
alexbalandiOPā€¢15mo ago
No description
Brody
Brodyā€¢15mo ago
odd @jr seems all is not done šŸ¤£
jr
jrā€¢15mo ago
That is intended. Postgres was basically deployable through 2 menus. New service -> database and New service -> templates. To keep backwards compatbility with plugins you can just use the database . Basically just add it to your project in the same way that you would before Or just press "New" and search "Postgres"
jr
jrā€¢15mo ago
No description
Brody
Brodyā€¢15mo ago
why can i see it listed in the templates section? old cache?
alexbalandi
alexbalandiOPā€¢15mo ago
No description
alexbalandi
alexbalandiOPā€¢15mo ago
The template also had a bit different setup, with persistent storage included I understand that it was essentially setup with dockerfile and mounted dir, etc, etc, but still was convenient
jr
jrā€¢15mo ago
They are both the same
alexbalandi
alexbalandiOPā€¢15mo ago
Anyway, right now the deployment of plugin fails.
jr
jrā€¢15mo ago
yup taking a look are you creating the DB in the forked environment?
alexbalandi
alexbalandiOPā€¢15mo ago
nope, in the original rn it has a weird set of vars tbh
alexbalandi
alexbalandiOPā€¢15mo ago
No description
jr
jrā€¢15mo ago
project link?
alexbalandi
alexbalandiOPā€¢15mo ago
f96e9e13-9c55-4a12-ba6e-9962cbb6d4cb the id, right? like I HAD redis set up, but its no longer there
jr
jrā€¢15mo ago
Yup that is separate
alexbalandi
alexbalandiOPā€¢15mo ago
Tried to add another one with same result
jr
jrā€¢15mo ago
Yup your project is in a weird state. Looking
alexbalandi
alexbalandiOPā€¢15mo ago
I do still have redis in forked env, actually. Originally I created redis as plugin and Postgres from template
jr
jrā€¢15mo ago
yup it is all good. Are you part of priority boarding?
alexbalandi
alexbalandiOPā€¢15mo ago
Yup, I am
jr
jrā€¢15mo ago
Sorry about the delay. Fixing a few issues here. Will report back when it is all good you should be good to go if you start from a single environment
alexbalandi
alexbalandiOPā€¢15mo ago
Okay, thank you! It's night for me, so no worries - I'll get back to this in the morning šŸ¤— Starting from single environment - you mean just no forking, right? Or no multiple envs?
jr
jrā€¢15mo ago
just no forking
alexbalandi
alexbalandiOPā€¢15mo ago
No problem, will keep it in mind, ty. so, main env works again now, thank you very much!
alexbalandi
alexbalandiOPā€¢15mo ago
When I created a new "dev" env though, I got super weird result:
No description
alexbalandi
alexbalandiOPā€¢15mo ago
the redis to the left is something long ago deleted, the rest is what is in production env. So i deleted "dev" again, tried to create "development" (all without forking) and it failed with error šŸ˜… Setting -> Enironments -> New Environment -> Create is what I used.
alexbalandi
alexbalandiOPā€¢15mo ago
this is newly created env
No description
alexbalandi
alexbalandiOPā€¢15mo ago
No description
alexbalandi
alexbalandiOPā€¢15mo ago
this is production one not urgent for me, just giving you more info ty again for fixing it for the main env! i'm leaving the test_creating_new_env be , just in case it helps you with anything, now sleep time šŸ˜…
jr
jrā€¢15mo ago
thanks for all the info!
alexbalandi
alexbalandiOPā€¢15mo ago
deleting things in that new env deleted them in production env too šŸ™ƒ oh, maybe that's actually intended šŸ˜…
Brody
Brodyā€¢15mo ago
what flow did you use to delete the service?
alexbalandi
alexbalandiOPā€¢15mo ago
Im dum in the morning right click -> delete service -> type name to confirm But now that I think about it, it kinda makes sense, to a degree, since the point of env should be same services but different env vars. But im not sure
Brody
Brodyā€¢15mo ago
right click -> delete service does the same thing as open service -> settings -> danger -> Delete Service from All Environments except the modal when you right click delete doesnt give you two warnings about how it will delete the service from all environments the action is intentional, its just missing the same warnings as the delete service from its settings has
alexbalandi
alexbalandiOPā€¢15mo ago
oh, I see. Is it possible to delete from single env? or not intended for enivronments to work that way?
Brody
Brodyā€¢15mo ago
you want forked environments for that, but thats broken still i assume @Angelo @Melissa another right click delete victim šŸ˜¦
alexbalandi
alexbalandiOPā€¢15mo ago
I edned up recreating it in new project 2c9f2913-06da-4053-a6c3-14bd48bb2682, works good so far after manually setting env vars. My only problem is that while redis spins up in development env, I can't quickly observe data tab in ui in it šŸ¤” might've messed sth with env vars, I guess, but i certainly can curl it from outside
No description
Brody
Brodyā€¢15mo ago
did you change any of the variables it came with?
alexbalandi
alexbalandiOPā€¢15mo ago
well, since i copied from production initially, ye šŸ˜… my dev env looks like this:
RAILWAY_RUN_AS_ROOT=true
RAILWAY_RUN_UID=0
REDISUSER=<actual user here>
REDIS_PASSWORD=<actual password hehre>
REDISHOST=${{RAILWAY_TCP_PROXY_DOMAIN}}
REDISPASSWORD=${{REDIS_PASSWORD}}
REDISPORT=${{RAILWAY_TCP_PROXY_PORT}}
REDIS_PRIVATE_URL=redis://<actual user here>:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379
REDIS_URL=redis://<actual user here>:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}
RAILWAY_RUN_AS_ROOT=true
RAILWAY_RUN_UID=0
REDISUSER=<actual user here>
REDIS_PASSWORD=<actual password hehre>
REDISHOST=${{RAILWAY_TCP_PROXY_DOMAIN}}
REDISPASSWORD=${{REDIS_PASSWORD}}
REDISPORT=${{RAILWAY_TCP_PROXY_PORT}}
REDIS_PRIVATE_URL=redis://<actual user here>:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379
REDIS_URL=redis://<actual user here>:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}
So i did change <actual password here> and <actual user here> compared to prod i tried changing the port too, but then switched it back - i assume its okay to keep it the same, since its different ip/domain on internal network
Brody
Brodyā€¢15mo ago
nino
alexbalandi
alexbalandiOPā€¢15mo ago
oohp, didn't edit out NinoFace
Brody
Brodyā€¢15mo ago
I don't even think you can specify a username other than default
alexbalandi
alexbalandiOPā€¢15mo ago
lemme try to connect with redis-cli
Brody
Brodyā€¢15mo ago
yeah changing the username in the variables doesn't do anything, it will accept any username
alexbalandi
alexbalandiOPā€¢15mo ago
i succesfully used AUTH with the password I manually set there so it definitely works for cli
Brody
Brodyā€¢15mo ago
yeah just the default deploy accepts any username
alexbalandi
alexbalandiOPā€¢15mo ago
True. Anyway, I can connect with redis-cli, but the ui doesn't display anything. then again, right now it's empty, hmm. I'll try ppulating and see
Brody
Brodyā€¢15mo ago
maybe the UI doesn't like the format of the password you set?
alexbalandi
alexbalandiOPā€¢15mo ago
true, my django project doesn't seem to like it too šŸ˜… eugh, lemme just reuse the one from prod no harm i guess and see how it goes ye, true will need to look up docs possibly it's stricter format than i expected now it displays properly
Brody
Brodyā€¢15mo ago
if that works, for future reference generate a password from a lowercase alphabet, uppercase alphabet, and 0-9 digits, no specials
alexbalandi
alexbalandiOPā€¢15mo ago
oh, I see the "!" got me. Was totally ok with cli though šŸ˜…
Brody
Brodyā€¢15mo ago
jr has told me they plan to add back an easy way to regen the password for databases, since currently (as you know) you have to manually make a password yourself
alexbalandi
alexbalandiOPā€¢15mo ago
ye, that would be good šŸ‘
Brody
Brodyā€¢15mo ago
bumped that to the team just now too
jr
jrā€¢14mo ago
This is good feedback, thank you
Want results from more Discord servers?
Add your server