SlowSloth
SlowSloth
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
Or you can write a dockerfile, there are quite few ways to do it but in your case, railway CLI
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
you can also use custom start command https://docs.railway.app/guides/deployments#start-command
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
yes
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
ie. you cannot access railway terminal
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
you cannot exec into railway pods
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
you can write a bash script and run that
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
There are many ways to do it in your case the easiest would be using railway CLI
cd <to where your manage.py is>
cd <to where your manage.py is>
railway run python manage.py migrate
railway run python manage.py migrate
railway cli will inject correct env vars and migrate your cloud environment
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
You need to migrate your railway database first, as there are no tables in there. To do that you need to run python manage.py migrate if you changed your models you need to make migration files first with python manage.py makemigrations it seems that you don't understand these concepts yet so I suggest you watch this first https://www.youtube.com/watch?v=F5mRW0jo-U4
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
"NAME": os.environ["PGDATABASE"],
"NAME": os.environ["PGDATABASE"],
replace entire line 98 with this
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
Django's learning curve's quite high, once you get the hang of it it's full CRUD APIs in minutes. Goodluck
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
think of environment variable as a dictionary
{
"PGDATABSE": "railway"
}
{
"PGDATABSE": "railway"
}
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
"NAME": os.environ["PGDATABASE"]
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
"NAME": os.environ["PGDATABASE"]
"NAME": os.environ["PGDATABASE"]
will solve it
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
os.environ["railway"] will raise an error is there is no such env var
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
seems so
62 replies
RRailway
Created by aydin26532 on 1/29/2024 in #✋|help
Connecting PostgreSql database to django project in github
in the deploy log, do you get ValueError?
62 replies
RRailway
Created by SlowSloth on 1/29/2024 in #✋|help
ValueError: 'api.telegram.org' does not appear to be an IPv4 or IPv6 address
😄 thanks for the support
21 replies
RRailway
Created by SlowSloth on 1/29/2024 in #✋|help
ValueError: 'api.telegram.org' does not appear to be an IPv4 or IPv6 address
Yes, i get it but I'm deploying to my VM for now instead of rouletting IPs.
21 replies
RRailway
Created by SlowSloth on 1/29/2024 in #✋|help
ValueError: 'api.telegram.org' does not appear to be an IPv4 or IPv6 address
I'm closing the issue. Thanks!
21 replies
RRailway
Created by SlowSloth on 1/29/2024 in #✋|help
ValueError: 'api.telegram.org' does not appear to be an IPv4 or IPv6 address
No description
21 replies