How can I install Directus extension to my project?

Anonymous
TRIAL

a year ago

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!

0 Replies

Anonymous
TRIAL

a year ago

N/A


a year ago

<@229706675936821249> - what would be the best way to do this?


a year 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


Anonymous
TRIAL

a year ago

I've already created it


Anonymous
TRIAL

a year ago

How I can use it?


a year ago

add the extension to your package.json and place the files on the extensions folder at the root of your project


Anonymous
TRIAL

a year ago

oh no I mean I have the dockerfile


Anonymous
TRIAL

a year ago


Anonymous
TRIAL

a year ago

It is working on local


a year ago

then deploy that


Anonymous
TRIAL

a year ago

Idk how to do it, I kind of new in docker and railway


a year ago

add that dockerfile to a gh repo, remove the image from your railway service, then add the repo to the service instead


Anonymous
TRIAL

a year ago

Does it need the docker-compose file?


a year ago

nope, railway does not support docker-compose


Anonymous
TRIAL

a year ago

Ok thank you, I'm gonna try


a year ago

railway will use your Dockerfile that you have shown


Anonymous
TRIAL

a year 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


a year ago

screenshot of the source settings please


Anonymous
TRIAL

a year ago


Anonymous
TRIAL

a year ago


a year ago

interesting, did you hit the deploy button?


Anonymous
TRIAL

a year ago

Yes


Anonymous
TRIAL

a year ago

Multiple times


a year ago

multiple times?


Anonymous
TRIAL

a year ago

I have redeploy multiple times I mean ahah


a year ago

the 3 dot menu's redeploy button is not what im talking about


Anonymous
TRIAL

a year ago

Oh it seems to work now that I have added a root directory


Anonymous
TRIAL

a year ago

Oh I don t know what you are talking about then


a year ago

you would have been shown this


Anonymous
TRIAL

a year ago

Oh yes


Anonymous
TRIAL

a year ago

I did


a year ago

you are right, it doesnt auto deploy the repo after you change it


a year ago

thats not ideal


Anonymous
TRIAL

a year ago

Thank you so much it is working right now