R
Railway8mo 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
Percy8mo ago
Project ID: N/A
Thomas
Thomas8mo ago
N/A
Brody
Brody8mo ago
@Medim - what would be the best way to do this?
Medim
Medim8mo 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
Thomas8mo ago
I've already created it How I can use it?
Medim
Medim8mo ago
add the extension to your package.json and place the files on the extensions folder at the root of your project
Thomas
Thomas8mo ago
oh no I mean I have the dockerfile
Thomas
Thomas8mo ago
No description
Thomas
Thomas8mo ago
It is working on local
Brody
Brody8mo ago
then deploy that
Thomas
Thomas8mo ago
Idk how to do it, I kind of new in docker and railway
Solution
Brody
Brody8mo ago
add that dockerfile to a gh repo, remove the image from your railway service, then add the repo to the service instead
Thomas
Thomas8mo ago
Does it need the docker-compose file?
Brody
Brody8mo ago
nope, railway does not support docker-compose
Thomas
Thomas8mo ago
Ok thank you, I'm gonna try
Brody
Brody8mo ago
railway will use your Dockerfile that you have shown
Thomas
Thomas8mo 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
Brody8mo ago
screenshot of the source settings please interesting, did you hit the deploy button?
Thomas
Thomas8mo ago
Yes Multiple times
Brody
Brody8mo ago
multiple times?
Thomas
Thomas8mo ago
I have redeploy multiple times I mean ahah
Brody
Brody8mo ago
the 3 dot menu's redeploy button is not what im talking about
Thomas
Thomas8mo 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
Brody8mo ago
you would have been shown this
No description
Thomas
Thomas8mo ago
Oh yes I did
Brody
Brody8mo ago
you are right, it doesnt auto deploy the repo after you change it thats not ideal
Thomas
Thomas8mo ago
Thank you so much it is working right now
Want results from more Discord servers?
Add your server