Open DangerDrome opened 8 months ago
Hi there, thanks for the feedback and detailed explanation.
From your feedback I gather you don't run Directus as an npm package locally, so installing it directly via npm and installing won't work, since Directus isn't running locally. Was is of interest to me is the Dockerfile setup not working.
There is a current issue by extending the Directus with custom extensions via Docker, but a fix is one the way.
Maybe you could help me decide how we can improve installation. We need the following to take place.
directus schema-sync install
)Any ideas? :)
I'm not too sure of the best approach, I think Docker should be the main focus and potentially providing one compose yaml or Dockerfile config that does everything?
In regards to the extension gui functionality it would be great if there was a list of objects to sync with Boolean checkboxes and then a button that says 'push' and another that says 'pull'? This may already be the case however I am not able to get the extension to run so I am not sure what it looks like.
The inability to sync or backup directus by default is a major drawback and your extension potentially solves this so it would be great to get it working as a one click install or something with a super simple gui along with it.
I have to second this, I have no idea how to use this repository. But I would love to try it out! Thanks
The issue regarding installing npm packages with the Directus docker image has been fixed since 10.8.3
Could you tell me where you feel the current Readme gets confusing or doesn't add up with what you expect.
Thanks @u12206050, I'm not sure what to do with
# This is for when building for production
COPY ./schema-sync ./schema-sync
Should we include it in our Dockerfile or not? How can we set this so it only runs on production?
Yes include it.
So, once you have the schema-sync folder in your source code and you want to build a container that will run in the cloud, then you have to copy the schema-sync
folder into the docker container that is being built.
During development however you use docker-compose, and then the using volumns
is enough since volumns allows two way sync, ie. when there is a change inside the container it is made on your host machine, and vice versa.
Hi, Some config examples would be good, what's the syntax of that stuff, is it based on some other directus feature?
The database columns used for tracking need to be added to the database. (Updated this to run via a Directus cli command directus schema-sync install)
So if you can only do this via CLI, I guess this won't work on Directus Cloud? I'm not a DevOps person and I'm desperately trying to get up and running in production. I have a local setup but I can't seem to get the recipe straight for going live. I would pay the price for Cloud but even that doesn't solve my issue. Unless I'm (hopefully) wrong?? Does this plugin work in Directus Cloud?
Correct you need to have full control of the instance and be able to add/commit the schema sync folder. So this won't work on the Directus Cloud unless you have custom enterprise.
Describe the Improvement
Making a better, step by step installation guide. For example:
Docker install
Step 1
Edit your docker compose file (usually docker-compose.yml)
Under "directus:", remove:
Replace with:
Step 2
Step 3
Step 4:
Ok, let's try NPM instead...
NPM Install
Step 1
Run
npm install directus-extension-schema-sync
in some directory somewhereStep 2
Then run
npx schema-sync install
to install the extension's migration and config files, but not the actual extention files? Does this need to be cp'ed manually?Step 3
Run
npx directus database migrate:latest
from any random location to run the migration that will add required columns to the... Oh Snap!ERROR: "DB_CLIENT" Environment Variable is missing.