R
Railway•13mo 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•13mo ago
Project ID: N/A
x4zx
x4zx•13mo ago
N/A
Brody
Brody•13mo ago
for sure can you share your repo?
x4zx
x4zx•13mo ago
This is a private repository, so could you give me your nickname on github? And I'll invite you to
Brody
Brody•13mo ago
brody192
x4zx
x4zx•13mo ago
I sent an invitation to You need this branch: https://github.com/x4zx/lyceum208/tree/v2
Brody
Brody•13mo ago
first things first, delete node_modules and add it to your .gitignore
x4zx
x4zx•13mo 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•13mo ago
ive been working on that will get back to you shortly
x4zx
x4zx•13mo ago
Got it. Thank you very much for your help.
Brody
Brody•13mo ago
any idea why its just a solid colour? https://test-service2.up.railway.app/
x4zx
x4zx•13mo ago
Because there shouldn't be anything else but the background.
Brody
Brody•13mo ago
so thats good?
x4zx
x4zx•13mo ago
yep
Brody
Brody•13mo ago
oh okay lol want me to create a new branch with my changes so you can review?
x4zx
x4zx•13mo 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•13mo ago
gotcha
x4zx
x4zx•13mo ago
Yes, that would be the best solution.
Brody
Brody•13mo ago
to be fair, i wouldnt even know how you could document what ive done youll see in a bit
x4zx
x4zx•13mo 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•13mo 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
x4zx•13mo ago
It's no big deal. It's still a test branch Thank you so much for your help! 🫡
Solution
Brody
Brody•13mo ago
the big changes where in railway.json
Brody
Brody•13mo ago
it worked?
x4zx
x4zx•13mo ago
We're about to find out.
Brody
Brody•13mo ago
lol
x4zx
x4zx•13mo ago
I think if it worked for you, it will work for me.
Brody
Brody•13mo ago
makes sense, but who knows, im neither a python nor a node dev
x4zx
x4zx•13mo ago
me too)
x4zx
x4zx•13mo ago
Is there a way to forcibly deploy without sending a commit?
x4zx
x4zx•13mo ago
I chose the v2 branch and I think it will start automatically
Brody
Brody•13mo ago
Brody
Brody•13mo ago
i think that re-fetches the repo and redeploys
x4zx
x4zx•13mo ago
Everything works great: https://lyceum208.up.railway.app
Brody
Brody•13mo ago
awsome
x4zx
x4zx•13mo ago
Thank you
Brody
Brody•13mo ago
no problem 🙂 you can remove me from your repo if you want
x4zx
x4zx•13mo ago
okay