Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Upload latest schema on startup? #153

Open
NilsBaumgartner1994 opened this issue Feb 7, 2025 · 3 comments
Open

Upload latest schema on startup? #153

NilsBaumgartner1994 opened this issue Feb 7, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@NilsBaumgartner1994
Copy link

Is your feature request related to a problem? Please describe.
I would like to always upload the latest schema when i am about to start my remote servers.

Describe the solution you'd like
A small folder where it uses it to automatically push the schema from.

Describe alternatives you've considered
A script which waits for directus to boot up and then to upload the schema.

Additional context
Great work of your project. Realy hope to see it come directly from directus.

@EdouardDem EdouardDem added the enhancement New feature or request label Feb 10, 2025
@EdouardDem
Copy link
Member

Hi @NilsBaumgartner1994
I had few feature requests similar to this one.
I was thinking to add a command wait that would complete once the server is started (relying on the info endpoint of Directus).
This could be used along with other commands, like this:

npx directus-sync wait --interval 5 --timeout 60 && npx directus-sync push

Could this help for your use case ?

@NilsBaumgartner1994
Copy link
Author

I thought about a custom api hook which would start during the init server start hook.
And then maybe when completed and uploaded the new schema force the server instance to restart aka. Crash

@NilsBaumgartner1994
Copy link
Author

@EdouardDem i created in directus a feature request: directus/directus#24647

But is it possible for directus-sync to somehow be called before directus even starts? Like passing a path to the extension, where to find the latest schema?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants