-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(dev): add connection with local directus instance #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice works ! Maybe the documentation on how to setup things should be clear that we need to populate directus. Why not having a setup command to do everything in a row?
I spotted some small bugs, and I don't know it it's a good thing that we need to specify all access policy for each table at hand.
It don't see any partner on the homepage despite we have some in directus, with valid times, can't find why.
a9efdba
to
bbd642c
Compare
Thanks for the review ! I've added the missing entries in the sample data to correctly display the partners on the home page. |
Ok I just had a crazy idea: what if we were to put the Directus config into a dedicated repository, along with all the scripts and data ? This way, we could easily share those among repositories (website, infra, clicketing). We could have symbolic links for typescript declarations, which should work even through git. I've got a working prototype on the branch What do you think ? @SidonieBouthors @NoeTerrier |
Honestly that sounds like a good idea |
Not a bad idea, it should work. But the merging workflow should be ensured: website and directus repo should always be synched. But it will be better for other services too. |
c630e39
to
2ea09a3
Compare
I've migrated the config to the directus-config repo, don't hesitate to check that it's correct too :) I'll start working on a PR for the infra repo to use this new workflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/.env.example
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is public now (in dev only), this simplifies the setup since we do not need to generate an admin token and give it to Directus. I don't think having to set everything public is much of an inconvenience, it is quick and we won't do it very often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice !
Well done, I think it is a great upgrade for the infra and the website development.
Allow to use a local Directus instance for development. It uses two environment variables, set in the
Dockerfile(.dev)
files:DIRECTUS_URL
andNEXT_PUBLIC_DIRECTUS_URL
.Provides a script to populate the database locally, as well as save its content.
The permissions for all the collections required by the website are set to read for the Public role, in order to get rid of the authentication token (only for dev).