R
Railway9mo ago
Thomas

How can I install Directus extension to my project?

Hi! I'm using this template: https://railway.app/template/2fy758 and I would like to add an extension to my directus project. I have to use npm i directus-extension-sync in order to install it. How can I achieve this? Thank you so much!
Solution:
add that dockerfile to a gh repo, remove the image from your railway service, then add the repo to the service instead
Jump to solution
27 Replies
Percy
Percy9mo ago
Project ID: N/A
Thomas
Thomas9mo ago
N/A
Brody
Brody9mo ago
@Medim - what would be the best way to do this?
Medim
Medim9mo ago
Extensions are a bad spot for this template atm (next week Directus Leap Week may change this), unfortunately you will need to create your own dockerfile/repo with directus and the extensions you want
Thomas
Thomas9mo ago
I've already created it How I can use it?
Medim
Medim9mo ago
add the extension to your package.json and place the files on the extensions folder at the root of your project
Thomas
Thomas9mo ago
oh no I mean I have the dockerfile
Thomas
Thomas9mo ago
No description
Thomas
Thomas9mo ago
It is working on local
Brody
Brody9mo ago
then deploy that
Thomas
Thomas9mo ago
Idk how to do it, I kind of new in docker and railway
Solution
Brody
Brody9mo ago
add that dockerfile to a gh repo, remove the image from your railway service, then add the repo to the service instead
Thomas
Thomas9mo ago
Does it need the docker-compose file?
Brody
Brody9mo ago
nope, railway does not support docker-compose
Thomas
Thomas9mo ago
Ok thank you, I'm gonna try
Brody
Brody9mo ago
railway will use your Dockerfile that you have shown
Thomas
Thomas9mo ago
I have replaced the source of my Directus Service with my repo but nothing changed, it is still using the directus image from Dockerhub
Brody
Brody9mo ago
screenshot of the source settings please interesting, did you hit the deploy button?
Thomas
Thomas9mo ago
Yes Multiple times
Brody
Brody9mo ago
multiple times?
Thomas
Thomas9mo ago
I have redeploy multiple times I mean ahah
Brody
Brody9mo ago
the 3 dot menu's redeploy button is not what im talking about
Thomas
Thomas9mo ago
Oh it seems to work now that I have added a root directory Oh I don t know what you are talking about then
Brody
Brody9mo ago
you would have been shown this
No description
Thomas
Thomas9mo ago
Oh yes I did
Brody
Brody9mo ago
you are right, it doesnt auto deploy the repo after you change it thats not ideal
Thomas
Thomas9mo ago
Thank you so much it is working right now
Want results from more Discord servers?
Add your server