Closed johndpope closed 1 year ago
Sorry, but im fan of open-source self-hosted solutions. Remote 3rd party database is worst solution as you can see. And even if its ok on start you will have to move somewhere else soon or you got vendor-lock :) So i don't understand why you want spent money and time on such things.
I suggest you to use docker-compose. It will install you mysql container. No setup required, all works from the box.
If you want online tool for DB you can connect your mysql container to metabase, or get some opensource online DB viewer, or even use desctop client. This is linux way: you use simple tools and pipelineing them to get what you want. AIO solutions are heavy and unreliable.
Also, there is nothing usefull in madelineProto database. Its just cache of different internal data...
oh no, supabase is open source.
https://github.com/supabase/supabase
it also has it's own docker cli https://github.com/supabase/supabase/tree/master/docker
its impressive / robust / extendable.
Oh, thats nice! You can deploy independend postgre container and setup supabase container to use it. Thanks for sharing!
I bring your attention to supabase. With this - you can remove the need for extra docker service.
Supabase has real time access to tables - which you can subscribe to and it's very nice ui / can do sql editor etc. For my needs building an app - it's very powerful. There's a free tier to 500mb database and many client libraries - eg. here's one for php https://github.com/rafaelwendel/phpsupabase
here I connect to database
I will use the memory option for now and avoid database. but it would be good if this worked. supabase has a REST api out of the box - so you can get all this data.
composer require amphp/postgres
the db creation is fine - but session is flacky - keeps dropping out and reconnecting. I used DB_MAX_CONNECTIONS=1
supabase has pgbouncer https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pool
php server.php --session=session