R
Railway•2y ago
x4zx

Is it possible to combine django and tailwind css into a project?

I have a project developed on django and using the tailwind css framework which is installed via npm. Is it possible to create some configuration file for railway, so that besides running the site itself through python manage.py runserver, it also runs tailwind css. The command would look like this: npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch
Solution:
the big changes where in railway.json
Jump to solution
38 Replies
Percy
Percy•2y ago
Project ID: N/A
x4zx
x4zxOP•2y ago
N/A
Brody
Brody•2y ago
for sure can you share your repo?
x4zx
x4zxOP•2y ago
This is a private repository, so could you give me your nickname on github? And I'll invite you to
Brody
Brody•2y ago
brody192
x4zx
x4zxOP•2y ago
I sent an invitation to You need this branch: https://github.com/x4zx/lyceum208/tree/v2
Brody
Brody•2y ago
first things first, delete node_modules and add it to your .gitignore
x4zx
x4zxOP•2y ago
This is accomplished. What about the configuration file for the railway? Also, in addition to running tailwind css itself, you will initially need to install it via: npm install -D tailwindcss and also install the necessary plugin: npm install -D @tailwindcss/forms
Brody
Brody•2y ago
ive been working on that will get back to you shortly
x4zx
x4zxOP•2y ago
Got it. Thank you very much for your help.
Brody
Brody•2y ago
any idea why its just a solid colour? https://test-service2.up.railway.app/
x4zx
x4zxOP•2y ago
Because there shouldn't be anything else but the background.
Brody
Brody•2y ago
so thats good?
x4zx
x4zxOP•2y ago
yep
Brody
Brody•2y ago
oh okay lol want me to create a new branch with my changes so you can review?
x4zx
x4zxOP•2y ago
This is just the first time I decided to install tailwind css locally instead of through cdn. So I didn't know how to properly run it on the host
Brody
Brody•2y ago
gotcha
x4zx
x4zxOP•2y ago
Yes, that would be the best solution.
Brody
Brody•2y ago
to be fair, i wouldnt even know how you could document what ive done youll see in a bit
x4zx
x4zxOP•2y ago
😅 Btw, I have one more little question. If the site will be able to create various posts, which may include images or videos - for this there is a special folder media. This will be stored all on the site itself, or should I connect some server for all multimedia?
Brody
Brody•2y ago
you can use storage volumes read this while i finish up https://docs.railway.app/reference/volumes i may have accidently pushed into v2
x4zx
x4zxOP•2y ago
It's no big deal. It's still a test branch Thank you so much for your help! 🫡
Solution
Brody
Brody•2y ago
the big changes where in railway.json
Brody
Brody•2y ago
it worked?
x4zx
x4zxOP•2y ago
We're about to find out.
Brody
Brody•2y ago
lol
x4zx
x4zxOP•2y ago
I think if it worked for you, it will work for me.
Brody
Brody•2y ago
makes sense, but who knows, im neither a python nor a node dev
x4zx
x4zxOP•2y ago
me too)
x4zx
x4zxOP•2y ago
Is there a way to forcibly deploy without sending a commit?
x4zx
x4zxOP•2y ago
I chose the v2 branch and I think it will start automatically
Brody
Brody•2y ago
Brody
Brody•2y ago
i think that re-fetches the repo and redeploys
x4zx
x4zxOP•2y ago
Everything works great: https://lyceum208.up.railway.app
Brody
Brody•2y ago
awsome
x4zx
x4zxOP•2y ago
Thank you
Brody
Brody•2y ago
no problem 🙂 you can remove me from your repo if you want
x4zx
x4zxOP•2y ago
okay
Want results from more Discord servers?
Add your server