Setting up mono-repo
Been trying to connect my IONOS domain to my deployment. Has anyone connected IONOS domains properly ? I've seen some inconclusive threads and something about requiring a proxy for IONOS. Thank you all in advance. @Brody
626 Replies
Project ID:
740bdf7f-248a-4096-9001-688bbb7a239e
740bdf7f-248a-4096-9001-688bbb7a239e
you will have to use cloudflares nameservers (you dont need to transfer your domain)
just use their nameservers, they make it very easy to switch, they will scan and transfer all your current dns settings
Thank you, I will look into it
https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/ 🙂
if you have any troubles, just ask
Thank you, already adding site at the moment, just a quick question about this Is it respective to how many pages my application has or something ? I have a django react application so single page ? 🙂 Thank you very much
oh no that has nothing to do with the routes in your app, thats for things like forwarding non-www to www
Ok cool got it
huh
Sorry I thought that was the last step but it isn't looking at changing nameservers
I won't need an SSL from them as Railway already has an SSL correct ?
correct
Thank you very much Brody, you made it very smooth
no problem, are you all good?
For this issue yeah xD
I now need to find a workaround my SMTP issue in order to keep the deployment on Railway
Any suggestions ?
are you trying to run an SMTP server on railway?
I send emails from my django backend app for registration/forgotten password/ order confirmations and updates, don't know if that's running an SMTP server, guess it is ?
no its not, there shouldn't be a problem with that
what seems to be the problem?
Well, emails aren't sending
And I get internal errror 500
well yeah lol
I have seen other threads on this
lol sorry
youd need credential stuff to send an email, are you adding those credentials to your railway service variables and then using them in your code?
From looking at my deployment logs I suspect my installation (Dockerfile) is wrong, I have the following -> File "/app/base/signals.py", line 84, in send_order_confirmation_email
email.send(fail_silently=False)
File "/opt/venv/lib/python3.10/site-packages/django/core/mail/message.py", line 298, in send
return self.get_connection(fail_silently).send_messages([self])
File "/opt/venv/lib/python3.10/site-packages/django/core/mail/message.py", line 255, in get_connection
self.connection = get_connection(fail_silently=fail_silently)
File "/opt/venv/lib/python3.10/site-packages/django/core/mail/init.py", line 50, in get_connection
klass = import_string(backend or settings.EMAIL_BACKEND)
File "/opt/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 30, in import_string
return cached_import(module_path, class_name)
File "/opt/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 15, in cached_import
module = import_module(module_path)
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
(...)
ModuleNotFoundError: No module named "'django"
send your dockerfile?
would you mind surounding all that text with triple back ticks
Of course
I was also trying to install psycop2g from requirements.txt however it wasn't working properly, and then I added it to apt get install and it fixed the issue
So something is definetely wrong with my Dockerfile knowledge
that stuff looks do-able with nixpacks
wanna share your repo so i could work on getting you a railway.json file so you can ditch your dockerfile?
Ehmmm private repo
Let me think
What do you need more specifically ?
it would significantly help in taking out the guess work, kinda just wanna see a general overview of how stuff is layed out and whatnot
Can I PM it to you ?
Will make public for the meantime
Aaaaactually hold on give me a sec
you can just add me to the repo?
yeah sure
brody192
Added
and it's now dinner time, so I will get back to you later
I'll be doing the same
Enjoy
And thanks
im ready when you are
Here
so what you have is a monorepo, thus it will typically require two seprate railway services
Yup, I have a postgres and the deployment
Is that what you mean ?
not quite
postgre is a plugin
Okay
so first things first, we will be modifying the repo a bunch and we dont need to waste railways resources building your app over and over until we are ready, so lets remove the repo temporarily
remove it from your service please
done
and then show me a screenshot of the project please
quick question, you have a react app and a django app, what is the django app used for
Django is the backend
And react is built and linked in django
where is that setup
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'frontend/build/static')]
let me find it one sec
this is backend/urls.py
Does that answer your question ?
yes, but how are the assets served
like css and js
oh
whitenoise ?
guinicorn
what about the react apps assets
I'm afraid I don't understand the question, sorry
As far as I know, as long as I runbuild it generates an index.html that I link django to and that's it
is django just an api?
Yup
django is pretty much just an API here
it's also in between the react frontend app and the db
okay then we are gonna do something more conventional here, beacuse having django serve the frontend is a hack to say the least
Hmmm well
I'm listening
my plan, two railway services, one service for the frontend (react), and one service for the backend (django)
I mean
First react/django app here
I followed some tutorials on this and this is how they were doing it
I do understand it and it makes sense to me, your solution
usually i see people with a react frontend and a nodejs backend, but its always two services for frontend and backend and the two services is quite standard
Yeah, I get it
Should work
so lets do that
Just don't know how to do it 😄
we will work though this together
Because then I will also lose my routes to /admin I believe no ?
where is the /admin route defined
Same place
Here
django?
here
you would just call that route from your frontend
it will all make sense in time, trust the process
Ok 😄
go ahead and remove the django code that serves the frontend
remove the dockerfile too, id like to use railway's nixpacks for this
If I make it
huh
root and then frontend backend underneath is that good
Or do you want just frontend in this repo
oh no, you can keep both things in this repo
trust me
ok
I do
Just wanted to understand what you wanted exactly
1 sec
you can push your changes to github so i can see and confirm everything is going accordingly
Another 2 minutes
Local shenanigans ..
sry
understandable
im a little confused here
I moved the folder out
woah, i never said to do that
HAHAHAH
yeah one sec
i just wanted you to delete what the arrow pointed to
Oooh
lol
You didn't want to have root and under root have a frontend folder and a backend folder ?
is this what you where trying to do
yes
oh then technically the frontend folder doesnt move
but I messed up my origin
Cause root folder of repo is root folder of the django application
i see
you can always wipe that repo and start fresh once you fixed the folder structure locally
yup
doing that rn
what branch will you be working on going forward
prod but I don't know why it's on master
github is hard frfr
lmao
I'm literally on it in pycharm
pycharm kinda mid tbh
vscode + github desktop is where its at
I like pycharm for django support
besides that yeah I'm on vscode also
im sure vscode has a plugin for it
I spent a bunch of time and then I got tired of it, conflicts with linting and so on, definetely just me not setting things properly and not knowing how so ...
its tough out there
ok
I made another repo
whatever it takes lol
what was your git ?
brody192
added
do me a favour and remove me from your old repo
yup
done
your repo seems to be missing a lot of necessary django stuff
oh yeah
oops
Need to reconfigure stuff now
fk
holler when done
yessir
So now the thing is
An example of a post request from react
I feel like this is too broad of a scope that needs to be changed
I know
since the django api will soon be a separate service, all you have to do is call the django service domain followed by that same path
this is standard, whatever tutorial you followed lead you down the incorrect path I'm afraid and this is just what needs to be done to run your app on railway properly
ok
django runs locally
one moment
I know it works locally I've heard that a million times
😄
running locally and running on an online cloud are very different things
No I meant like I separated them both and it's running
huh
on railway??
no
ah okay, let me know when your repo is ready for me to look
ok
should be good now
was missing manage.py for some reason and requirements
true
I also removed dockerfile
cool, will look in a sec
I assume you have something like postman to test your api when it's live right?
yes
whatcha got
I have postman
question, why is the python verison in runtime.txt a negative value?
isn't it supposed to look like that ?
don't think Iwrote that file
im not aware of any negative python version lol
LMAO
the contents of that file should only be
and it should be located in the backend folder
while youre at it, move the procfile to the backend folder too
in your requirements.txt file using
psycopg2-binary
instead of psycopg2
will result in much faster build timesBut isn't it not recommended for production ?
says who
The internet lmao
Idk
Saw that in many places
I'll change it
first ive heard that
psycopg2-binary==2.9.6
this cool ?
yes
and you are right
but if its not gonna tell me why, then i dont care, it speeds up build time
Yo I need more people like you in my life
haha
thanks
changed it
looks good
It's rought out there for a junior, especially in today's market
now, something i just wanna point out, but i will let you do in the future
you are committing your .env file to your repo, this is not a good idea, even if its a private repo, you should be storing the credentials in your railway service variables
Understood
hmmmm I did do that
However django didn't seem to get them the same way ?
it would
ok
okay i see
well then lets tackle that now
since you are 90% of the way there
delete your .env file (but do a double check if you have everything stored in railway)
yeah remove that too
done
other people may tell you otherwise, but in my opinion storing your database password and stripe key in plaintext is not a good idea
nw I get it
here you arent using the standard variable names, as they are in the railway variables
https://github.com/BADIUDragos/annedora-2-prod/blob/prod/backend/backend/settings.py#L125
so here is an excample of using the correct variable names
https://github.com/railwayapp-templates/django/blob/main/mysite/settings.py#L81
Okkk
so just names
yea
no need to do environ vs getenv ?
do what the official template does
don't need this I suppose
also
I really really appreciate everything
But I kinda have to call it for tonight
Any chance you're available tomorrow or later ?
not sure tbh, don't know why you have another database object/dictionary elsewhere, leave it for now I guess
7 days a week
You're a G
All right
Thank you soo much
Have a good one and see you later
no problemo
see ya later
Brodyyy
I fixed the settings for the DB as you said
What's next ?
@Brody
good question
send me a link to your repo again
looks good, next thing
for your frontend, please follow this guide
https://help.railway.app/project-help/f9v3gkPQRy4UShk5SnoPDH/getting-your-create-react-app-running-on-railway/qHRsgxa5n57xLp1yVgk9fP
done
do you have any build or start commands defined in your railway service?
No, this was all done with the dockerfile, which you told me to ditch
good
any variables?
yes
oh yeah
rename that service to something like annedora-prod-backend
ok
since those are all variables for your backend
show me your domains for that service?
cloudfare is good, since yesterday
renamed
now that is obviously the domain you want to access your frontend from, so remove it from this service
then go ahead and setup an
api.annedora.ca
or something similar, you get the ideaCan I just leave this as the frontend and make a new service ?
Cause it was already configured for frontend
that means you have to move all the variables over, it doesnt matter to me, i just thought updating the domain would be easier
ah ok
true
okay so let me know when you have that sorted
so basically rename this to api.annedora.ca and same thing in the service, than make another cname here for a new empty service, correct ?
1. delete both the railway generated domain and the custom domain from the railway service settings
2. generate a new railway domain, make sure its named appropriately
3. delete the root level cname domains from railway
4. add
api.annedora.ca
to your railway domains
5. use the cname railway gives you to make your api
subdomain in cloudflaremissed step 2, im not sure its 100% necessary, but ive seen people have troubles using only a custom domain
understood
i think its time to deploy your backend
first set the root directory to
/backend
then you add your repo back
waitdoes django need to run migrations?
the db is already populated
cool
should be fine
famous last words
lmao
Yeah ...
been there
done that
xD
well let me know how the deploy goes
I'll try switching back to getenv
nooo
slow down
oke
you are using
environ
with the bendy brackets ()
you need to use square brackets []
should I move this into the first declaration above
Ah ok
cool
why do you have database variables there and here
https://github.com/BADIUDragos/annedora-2-prod/blob/prod/backend/backend/settings.py#L125
Followed some thread somewhere a while back that was doing this ...
Moving it up
interesting
waaaiy
waiiit
?
just delete this ?
ah I believe the dj database thing was so I connect to the remote container from local dev
so delete dj database url thing right ?
or what's the idea ?
you very much want to keep this
https://github.com/BADIUDragos/annedora-2-prod/blob/prod/backend/backend/settings.py#L125
this on the other hand, idk what this is for
this should do it ?
looks like it
So like, are you like 1 person or is it multiple people just using that account for support ?
you think im more than 1 person?
idk haha
im one person, but why
7 days a week 24 hours
idk hahaha
oh i though maybe because im forgetting things youve previously said
nooo not at all
you get paid for this right ?
no
its for fun
damn
so you are a G
one could say that, yeah
looks good
test it with postman
This is basically a small family business, my uncle is a beekeeper and we make honey and derivative products
If you'd like I'd be more than happy to send you a jar or two
PO box or whatever you'd like
thats very nice of you, but shipping costs wouldnt be worth it
Are you in the US ?
canada
We're also in canada, montreal
hows the air lol
I'm sure I can cover the shipping
It's not bad at all
yesterday we had some smog
no no its okay, im just chilling
Actually right now I am 2 hours north and you can smell a bit of smoke, but nothing too serious
Just rained so not too bad
im southern ontario and its not bad at all, without rain, winds took it all to new york it seems lol
Oh ok
I have friends in Windsor
im not that much south
lmao ok
Hamilton area to be vague
Dude
Shipping is gonna be like max 20$ for real
Worse case I got a friend going to toronto next week
but what am i supposed to do with honey lol
Many things
You may replace your coffee sugar with a spoon
You can put it on toast
pankcakes
that stuff sounds like a lot of work
xDDD
Ok we have candles too and soaps
my mom likes candles
Deal
okay well talk later, for now lets get your app online
yessir
in your cloudflare, set it to full
done
test your api with postman now
https://api.annedora.ca/admin
Shouldn't this display the django admin panel ?
ideally, but django is returning an internal server error
what do the logs say?
just noticed
SECRET_KEY must not be empty
ok 1 sec
redeploying
works
awsome
need to set debug to false tho 1 sec
yeah you can do that dynamically
how ?
oh yeah
set it as variable too ?
have different settings locally ?
nah i have better idea
one sec
Also, lowkey
We're looking for people, just in case you're interested, I work at Rolls-Royce and we do fullstack, mostly django, might be a bit boring for you but hey just in case you know
unfortunately im not a python or django dev
Oke
i appreciate the offer though 🙂
Not an issue for my team tho
We're interviewing fresh grads rn too lol so ...
I appreciate your help sir
?
I have no idea ah
not in
ah ok
told you im not a python dev lol
smart
i mean hey
I never would have even thought of this so
Dude you're a G stop ...
that way when it runs on railway
RAILWAY_ENVIRONMENT
will be in os.environ
so debug will equate to False
at least i think lolunderstood
hey we're here to have fun
im learning too
how old are you if I may ask
you can also aikido deflect the question if you'd like
mom says 22
i forget these things
lol
man at the casino asked how old i was upon entry and i went "uhhh" for a solid few seconds
xDD
works
all is good with backend?
youve tested more than just /admin?
api.annedora.ca not found instead of normal debut thing
huh
oh yeah, you have no routes registered for the root, so thats normal
yes
one sec
password not working for admin login or smth
are you sure the database on railway has all the required data?
Yeah I had previously used it, when the website was deployed with the dockerfile
had a staff account in django and everything
check the data with something like dbgate
Hmm ok
internet kinda slow where Im at rn
gonna take a minute to download
what ya got
also never used this before
speed wise
like 50
bruh
almost done downloading
Hey it's northern quebec almost ahahhaha
50 is slow?
I mean
i got 21
I got gigabit in montreal
damn.
I'm sorry
lmao
hmm
yeah these don't look like normal django tables to me
did you ever have a local postgres database?
No that's why I'm a little confused
thats timescale stuff, comes standard with railways postgres database, you can ignore all those
Yeah don't see the django specific tables
thats not ideal
But in the service I do see them
show?
\
Like I even connected to the container from local
And created a new superuser
But it won't let me connect to django admin with it
with the railway cli?
Local
and on the deployment
On deployment I get forbidden CSRF error
and locally
this is not bad thing, its fixable
this is normal, since you no longer have a .env file
you dont have an .env file right?
no .env no
okay good
How is it related to .env tho ?
do you have the railway cli installed?
negative
you see this because you dont have a .env file with your database credentials anymore, it cant check if the username exists since it cant connect to the database
so go ahead and install the railway cli
https://docs.railway.app/develop/cli#installation
I guess this didn't do it then
ah you comment out code during local development
thats not ideal lol
I agree
Just wanted to see what's up
quick revert anyways
let me know when the cli is installed
intalled
also logged in
run
railway link
and railway service
while in your backend foldershow me
railway status
railway service
and choose your backenddone right ?
run
railway variables
and does that include the same stuff as in your railway service variables?Yup
shows me everything
whats your regular start command to start django locally
python manage.py runserver
okay so now you can do
railway run python manage.py runserver
so that your django app gets started locally but with all the railway variables available locally too
wayyyy better than storeing database credentials in a plaintext .env filethis is very cool
thank you
check if login works locally
I created another superuser via railway run
railway up to deploy changes ?
nope
i hate that message
oups, I did it
ctrl c'ed
well could you login locally?
still same issue
very wierd
incorrect pswd
btw you need to run anything that needs access to the database with
railway run
like the command to create a super useryeah that's what I did
yeah I see the new user in the db on the service directly
but I can't connect to it
hmmm well i dont know what to tell you, i cant see your database
drop the db ?
lol
lmfao no
xD
very odd ...
im acctually not sure what you meant, the term "drop the database" means to wipe the database
yes
I did mean that lol
oh lmao
i mean its your data
I will try to make another superuser maybe I made typos
it's a fresh db, don't think theres a reason to drop it tho
dont you have some kind of api data on it??
nada
nothing
where is your data then lol
What data
arent you building a store or something
yeah
so product data
Don't have any products added
all the tables are empty
Products may be added from front end
fancy
upload pictures etc
need to find a way to keep the images properly after this
s3 bucket or something idk
that's for later ....
yes since railway doesnt have persistent storage
i recomend cloudflare r2, you use amazon's s3 sdks with it and the first 10gb is free
Thank you
I will look into that
or if its just images, cloudinary is great for media
Really just images ...
Product picture
then cloudinary
front end logo, but I can just throw that directly in the reactapp
and the ico
true
it's mostly just the product pictures
product pics would go to cloudinary
yeah
either way, gotta figure out why you cant login as the superuser
you said you can see the superuser in the database through dbgate?
jsut made another one
still not working
I can't see the tables I see in the postgres service
inside of dbgate at all
ah
you wanna just dm the database url lol
nvm it's inside railway
here
ah perfect
yeah I see the same as in the postres sevice
they're all there
fkn wierd
run
railway run python manage.py migrate && python manage.py runserver
locally
then try loginnothing to apply tho
I already applied
I still ran it
try login
yeah wrong username and password message
so wierd
I get a 200 status code too
well since im not a django dev, off to google you go lol
yupp ...
any web console errors though?
odd
well let me know when you find out whats up, gotta get that backend running locally before we try on railway again
found a thread on this issue
2 minutes
django_session table empty
how make not empty
remove non standard settings I don't have any of these
make sure db is synced ?
meaning what
I created superusers
db is synced no ?
try to authenticate, yeah good luck lol
isnt that what
migrate
doeslink is 404
oof
yeah ok
migrate does that exactly
wish i knew django so that i could help you out here more
So like
do you work also ?
freelance or something ?
nope 🙂
you learn full time ?
nope
i fuck around full time
i respect that
xD
bank account would rather i didnt though lmao
eh ...
one of the consequences
true
Do you plan on getting a dev role or something ?
not smart enough to dev
No way dude
yeah fr, im not qualified for a dev role
How
theres so much i dont know
Bro ...
That's like
All of us
You're underestimating yourself
i cant figure out why you cant login to your app, i am not underestimating myself
HAHAHA bro
I can't figure out either still browsing
by that logic we both arent qualified for a dev role
haha
sorry you have to quit your fancy car job, i dont make the rules
facts
Found this thread on stackoverflow
dude posted this issue in 2020
and replied in march 2023, I switched jobs, been doing c# for the past 3 years, can't remember how I fixed the issue back then
rip
lmao
omfg just like the memes
Stack Overflow
Forbidden (403) CSRF verification failed. Request aborted. Reason g...
Help
Reason given for failure:
Origin checking failed - https://praktikum6.jhoncena.repl.co does not match any trusted origins.
In general, this can occur when there is a genuine Cross Site Request
found this if you understand something
I added that line but nothing
thats for the issue when on railway, gotta get your app working locally first
are there no console errors from django when the login fails?
nope
odd
literally just a successfull 200 post
what does the response of that request say tho
1 sec
I think we can just say fuck this
Cause I have enough functionality in the frontend to overwrite my backend admin needs
and will be able to login to staff from frontend
will you tho
will look at it later
hopefully
can you login staff from backend locally?
negative
then it wont work from frontend lol
I have had this in the past
And it worked
And then it somehow fixed itself
don't ask
I have no idea
well okay then, we can deploy the frontend tommorow, shouldnt take this much effort
yup
will continue to look at it for a bit tho
all good thank you
since we are in the same timezone, its late lol
yeeeeah
no worries man
really appreciate it once again
have a good one see you later
no problem, always happy to help, cya
still no solution for the admin thing
thats unfortunate
indeed
do you still wanna deploy your frontend anyway?
yeah
okay create a new service and give it a frontend name
done
have you added your domain?
yes
set your root directory to
/frontend
?initializing
cool
if you used to call just
/wtv
then yes you are correctwell, I guess brb
i mean did the build and deploy work?
negative
whats the reason? youre smart enough to know that isnt the actual error message
treating warnings as errors because process.env.CI = true failed to compile
haha your build has warnings
lmao
fix it later
Will do
lmao
for now, set CI = false in the railway service variables
I got a couple of #12 35.21 Line 3:24: 'Row' is defined but never used no-unused-vars
#12 35.21 Line 3:29: 'Col' is defined but never used no-unused-vars
xDDD
very common, i see that all the time
Will cleanup later just trying to push main features and deploy
gotcha
Gonna do localization later aswell as other features
For francophones
dont know what that is
Like
set language to french
based on if they're in quebec
and then have the en/fr thing at the top to switch
well
deployed all right
but it's somehow got a wierd ass error, checking the code
ah i see
will lyk when I fix that and the urls
well well welll
be my guest please and check out annedora.ca
also login via frontend works
no image 😦
haha yeah
that was a test product
Images is next indeed
very nice
Actually no
not nice?
emails is the next issue
which was the first issue in the first place
lmao
yes very nice
happy it's online
awsome
So you're saying these types of email sending should work right ?
i dont see why not
also, you will setup an
[email protected]
email right?
or something along those linesYeah those are already setup
just sending emails to myself for now
cool
now i think is a good time to tell you
you're breaking up with me ?
usually the team plan is required when hosting a commercial product on railway, but this is just a simple storefront for your parents business, so im confident in saying that the railway team wont have any problems with it as long as you are on the dev plan
yeah of course will be
Cool, thank you
looks like your github account will be verifiable without issue, so just upgrade to the dev plan sometime soon
Yeah
Just gonna fix all the issues first
makes sense
hopefully sending emails works
remember you dont need to deploy every change, do as much testing as you can locally
true
I should setup a dev branch
Railway will only pull from the prod branch correct
?
So whenever I merge a PR should deploy
fun fact, i dont use github very much, so i am also no help there
i have never deployed my own code from github
Interesting
all testing is done locally, and i simply just write code that i know works on railway
A master jedi who has only thought other how to use the force, but never used it himself
ah ok makes sense
What apps do you have on here ?
this is my most publicly used app
https://utilities.up.railway.app/
bunch of demos or utilities for railway stuff
You're making railway a bunch of money
how
If you don't work for them as you say, they should definetely hire you lol
I mean, by helping people use the service
ah i see
You're a huge business catalyst
but the thing is, they dont need to hire me to get me to help the users, i help regardless, so why would they hire me for something im already doing
Yeah
I said should
true
xDDD
This should work right ?
nope
the start script is only for railway now, thats why my guide had you rename the original start script to dev
truueee
forgot about that
You good with react/front end right ?
absolutely not
I got the wierdest shit happening
not even email related
This is on the deployment
This is local
With railway cli
any browser console errors?
I mean yes
But only for the stripe part
which is not what worries me
The order summary block shows results from an API call
which is successful according to reduc
redux
and I see the state values updated
ah the joys of deploying code that was only developed with running it locally in mind
wait nvm
interesting
very
I literally just redeployed a change where I moved the logo and the ico in public/images and this is fixed but the logo and ico aren't working
interesting
frontend is hard eh, thats why i dont do frontend
What do you do ?
backend, and when i do rarely do frontend its vanilla js, none of that react crap
Backend with what ?
no offense, react is just confusing for me
golang
haha dude none taken dw
I just learned react
Cause I want to become a contractor or something
cool
haven't gotten into golang yet
yeah lots of jobs for react, time to learn nextjs next
That's the plan yup
After this I'll do like a portfolio app and use that as nextjs learning project
React/Django is pretty popular
Just gotta get a couple more years experience
And obviously deploy it on Railway, duh
another fun fact, railway is not geared towards frontends
In what way ?
btw, what did you say to use for images again ?
its just designed to deploy backend api services
I see
I mean it works ...
netlify, vercel, github pages, cloudflare pages, etc are purpose built for frontends
true
cloudinary
And from what I can tell it's super simple and efficient
thank you
gonna look at it right away
You go to uni btw ?
nope
Good
Dude you're super smart
real (school not good)
I respect it
And what you're doing is super smart also
You're in a very good place for learning
yep ive learned so much
ngl you've got me thinking about quitting my job and stopping to waste my time there
And doing the same thing
or similar
bro you work for rolls royce
The job ain't bad, I'll admit
It's the people that I hate
Maybe now that I'll work on a new project with react instead of jquery and shit it'll be better
And with new hires coming in changing the vibe
Dude you sure you don't want a refferal ?
im not a django dev lol
Doesn't matter, we provide training
As most jobs do
However right now we're interviewing some seniors so idk how it would go
but i dont like python
Ok, fair enough ahahha
its kinda slow by default, and has a much higher resource footprint compared to golang
but thats just my take, everyone should use the language that fits them best
Most people coming out of uni have less important knowledge than you're exposed to in a single month
Yeah I mean, once a company kinda starts some projects with something they stick with it unless there's a separate need or something
Businesses don't care as long as their money is coming in and results are being rolled out
so real
@Brody Do you know if I can send images from one service to the other ?
if you code for that functionally in your own apps
well
I already had this functionality
but I don't know how to see the images/if they're actually being there
I tried running in debug locally with CLI but doesn't seem to be a good way
Added backend to cloudinary
well for starters how did you do this before?
trying to run it in debug somehow locally
Files were saved in media folder from django
now we split the service into two
so should've technically still do it
Uploaded from FE to BE via simple request
and what fails?
Well
The requests succeeds in production
But the image wasn't there
but you want to be saving images to cloudinary
exactly
so you shouldn't need to do a disk write, you can do an in memory buffer and upload straight to cloudinary
DEV Community
Uploading images to Cloudinary Storage from a Django DRF Application.
Sometimes while working on applications that require the use of images, a simple process like...
Used this
Does it look legit to you
idk kinda looks like AI generated garbage
ChatGPT wasn't there when it was published tho
xD
wdym we had AI in 2022
either way, it's a garbage article
I'd personally implement the upload endpoint myself using the cloudinary sdk directly
relying on too many random packages is never a good thing
Still looking into the email thing also
Do you know any other threads with similar issues ?
Seen some but nobody ever answered them
what's wrong with sending emails
They're not sending
Log says
here
let me redeploy cause I changed smth 1 sec
haha okay
``````
Small mention of email trace here
And then throws a
....
Not very informative tbh
I've seen this log on multiple threads
No conclusions
Wait
I don't need quotes for string values in railway variables right ?
I'm no django dev, but that looks like something you should ask Google about
oH WELL
Just fixed it
Thanks for listening to my BS, it actually allowed me to think better at 1am
let's see if I get the email now
yup got it
variable had quotes
easy fix
Oh well
Only cloudinary left now
I'll leave that one for tomorrow
Good night G
if possible try to use the least amount of dependencies as possible, less dependencies = faster build time
Yeah, makes sense
Well
Used the django package for cloudinary
Amazingly easy to implement once I found the correct documentation
Didn't even have to change something in the FE
Whats FE?
front end
fancy acronyms
lol
@Brody enabled stripe live and activated developer plan
Processed first payment too
that's awesome!