I feel like having to pull updates from git to the project is a bit messy and clumsy. In our case, a Directus setup exists as its own git repo, so pulling from git is not possible as an upgrade option. Directus should be a composer dependency of the project, so that an update only requires a composer update.
Upgrading/File organisation
I think we should have a composer installer that publishes specific folders/files that need to be edited/customised but keeps the core Directus files in the vendor directory.
Yes. Just checking if anybody else is working on it or if it makes sense at all?
Everything that makes installing easier is always a +1 in my book.
What would happen to the config files / uploads / logs folders? Would those be all nested in vendor..?
Also, how would one correctly point to the document root? 馃
Also,
I feel like having to pull updates from git to the project is a bit messy and clumsy. In our case, a Directus setup exists as its own git repo, so pulling from git is not possible as an upgrade option.
This is both an opinion and a very specific problem (that might have a specific solution). Why would you keep a copy of Directus itself in the repo of whatever project you're building?
I have my concerns about this even though I really like the idea (since it makes it easier to extend/customize directus on the server side). The problem is that this is no small change, and changes a lot of what is going on in the server since directus literally becomes a library.
This would be a huge breaking change on how the project is structured right now, and how we ship new releases, but it's really worth checking.
I think this would be a long-term objective @rijkvanzanten ?
@bendubuisson do you have any project in mind that works like this so I can take a look on how it's done?
What would be the ideal flow here?
Some random thoughts we should take into consideration:
/my-project/vendor/directus/public/)* Go with something like this?
lib/directus // all the core stuff (lib == vendor?)
logs/
config/
extensions/
Also, how would one correctly point to the document root? 馃
I feel like some files will need to be created by the composer installer. This would be one of them (see Laravel for example)
@WoLfulus thinking about Laravel for example
Also,
I feel like having to pull updates from git to the project is a bit messy and clumsy. In our case, a Directus setup exists as its own git repo, so pulling from git is not possible as an upgrade option.
This is both an opinion and a very specific problem (that might have a specific solution). Why would you keep a copy of Directus itself in the repo of whatever project you're building?
I guess if you don't plan on editing Directus that's ok. In my case Directus is the base of a project, so I can't keep it tracked by its original git repo (if any of it makes sense, I might not be explaining myself really well here 馃槢 )
Ah so you're kinda treating it as a fork of Directus per project. Just make sure you don't run into any licensing issues 馃
Ah so you're kinda treating it as a fork of Directus per project. Just make sure you don't run into any licensing issues 馃
Basically yes, a fork without forking - and this is a huge pain because everytime there's a release, a manual diff is needed in order to update all the files, it's really messy. As I mentioned on slack, we'd have directus installed inside vendor folder and we'll just "run" it through bootstrap files (index.php for example), adding custom routes and extensions as needed.
The current setup forces us to commit the whole directus api on our private repositories, when the only thing that is really needed is just our customizations.
I'm all in for this one, but will take some time and effort to get it done right.
Also worth mentioning how flarum works, let me know what you think about it @bendubuisson
@WoLfulus yeah this is exactly what I had in mind. I'll see if I can come up with something soonish
This could be a different repository which holds the bootstrap files and a composer.json , you then could create a new directus project with composer create-project.
This is how https://github.com/laravel/laravel works, by installing the framework package and creating the basic scaffolding.
bendubuisson do you have any project in mind that works like this so I can take a look on how it's done?
Crat CMS works like this. Its core is a composer package and the actual project contains only project-specific code, configuration and the document root where the application entrypoint, calls the Craft CMS core, resides.
Most helpful comment
I have my concerns about this even though I really like the idea (since it makes it easier to extend/customize directus on the server side). The problem is that this is no small change, and changes a lot of what is going on in the server since directus literally becomes a library.
This would be a huge breaking change on how the project is structured right now, and how we ship new releases, but it's really worth checking.
I think this would be a long-term objective @rijkvanzanten ?
@bendubuisson do you have any project in mind that works like this so I can take a look on how it's done?