Directus : stable? usage?
I like idea of Directus so installed it.
(A) Seemed to install ok but many time it booted me out with extremely helpful 'something gone wrong' messages. reloaded page and logged back in half dozen times until I lost patience and uninstalled.
(B) Usage instructions : pretty good documentation about the app itself, but sweet-f-a about real life usage, connecting to it from a website front-end, and not much on general internet searching.
Is it worth persevering with ?
- I never encountered this, but I am using Directus 9 written in Node.js not Pretty Horrible Programs (PHP): https://git.atrilahiji.dev/atrilahiji/cloudron-directus9-app
- Their documentation is pretty straightforward when it comes to their API, which is all you should need to get it working in a frontend. Directus 9 actually builds documentation right into the app so you don't need to go to their docs page. If you want, my site has its code publicly available and uses Directus right now: https://git.atrilahiji.dev/atrilahiji/personal-site
Its just a matter of consuming the API and working with the data returned in your frontend.
@atrilahiji Thank you for the advice.
I will develop a bit more patience and explore further !
My problem is I know about Node.js. If I fix that, it might all be clearer.
Since first posting, I found a simple PHP SDK for Directus and a simple example app. So will take another look.
@atrilahiji Is there a good place which explains how to install a custom Cloudron app like yours ?
Still new to Cloudron so only explored the official available instances.
@timconsidine I do also make video guides from time to time for these kinds of things so if that’s something you think would help just let me know.
@atrilahiji Thank you
I think maybe the missing piece in my understanding of how to start is the CLI
I will check this out
So 'workflow' seems to be :
- install CLI locally (I'm on Mac)
- use CLI to install a packaged app (like your Directus9) to hosted cloudron (my Cloudron is a Linode VPS)
My Cloudron is production and has live systems like EspoCRM and LAMP websites. So very nervous of breaking it.
I guess I can test it out on a separate free-tier Cloudron before installing to production Cloudron.
Time to get brave !
@timconsidine Thats exactly right, yeah. And while I don't believe it would cause issues, testing on a non-prod environment is never a bad idea
@atrilahiji That's very kind.
I know it's a lot of work to do a video tutorial, so I wouldn't push you into it.
If it helps others also, all resources for learning are useful.
@timconsidine Yeah sure. Will probably be have to be tomorrow but I'll post here when I have something.
@atrilahiji So I think I worked it out
Things I didn't understand / had to do, in case it helps others :
- install node/npm : I used brew install node
- install Cloudron CLI : easy from cloudron instructions
- install Docker : brew didn't work so used DockerDesktop for Mac
- create docker account
- start Docker Desktop and log in
- create folder, cd into it and downloaded to it your repository https://git.atrilahiji.dev/atrilahiji/cloudron-directus9-app
- cloudron build seemed to work (visible in DockerDesktop) but failed to push image : no idea why, said not logged in but I was
- docker build worked (as per cloudron instructions)
- docker pushed worked (as per cloudron instructions)
- cloudron install worked (as instructions)
So process is easy, once I understood what I needed to do.
Only problem is the installed Directus9 fails to load.
Cloudron says it is running, but Admin page sits with spinning circle, as does the app window.
But I didn't check your repository for any config changes I needed to make.
So will do that now and see if I can get it working.
At least I know now how to build and install a custom app.
Cloudron is so fantastic, really helped me with app installs and self-hosting.
It just got more fantastic-er !
(yeah, yeah, I know, butchering English is my speciality).
False alarm : app from @atrilahiji does work 'out of box'
I normally launch my Cloudron inside of a WebCatalog instance, and for some strange reason I don't understand, the admin page does not load in a Webcatalog browser window.
But in a normal browser window (and in a dedicated Webcatalog instance) it does load fine.
So custom app installed and working. Thanks so much @atrilahiji !
Now I have to build the front-end for the Directus9 back-end.
And some more new tech to learn unless I fall back on PHP use of API.
But hey, life's for learning.
@timconsidine Ah I see, I'm glad it worked! Yeah I actually just re-did my blog using directus9 and Gridsome (Gatsby but with Vue instead of React): https://git.atrilahiji.dev/atrilahiji/personal-site
I'm currently committed to Hugo as static site engine.
But will certainly consider how to use Directus with it later.
And learn about gatsby/gridsome - they seem popular.
But for now a more pressing project.
Build front-end website which allows users to buy "tickets" for an event, capturing their data and their choice of event selections, storing the choices and user info in Directus table for later processing.
This could all be done with a regular form or poll or survey app, but I want the data stored in a way it can be checked, assessed and acted on, not just get a form response by traditional email, which would then loading in a database.
I hope this is a suitable use case for Directus, even though it's not the regular headless CMS use case.
@timconsidine I think it would be. Directus is generic enough I would think. Rather than being specifically focused on posts or blog content it is more so just an API wrapper over an SQL DB.
robi last edited by
This seems like a better job for EspoCRM.
@robi Yes, EspoCRM is an option.
But I have only used their web-to-lead capture, which doesn't seem suitable, even with adding custom fields. I'm thinking that I would need to create a new Entity, and I have not yet checked how their API supports accessing a custom entity. Have you worked with their API much ?
robi last edited by
marcusquinn last edited by
@timconsidine Yeah, it really couldn't be simpler - best recommendation is to try it - I've been working with it since the beginning of the year and very happy with it all.
You don't need any of the paid add-ons, although the advanced pack is nice if you want to automate later but it's all fully functional, unrestricted, and well worth learning.
@marcusquinn thank you
Are you using PHP to access the API ?