BytemarkHosting / symbiosis

A hosting environment that works with you, not against you.
GNU General Public License v2.0
21 stars 14 forks source link

Simple database creator #46

Open patch0 opened 7 years ago

patch0 commented 7 years ago

A typical usage scenario for Symbiosis is a user creating a new site, then uploading a PHP webapp and expecting it to work.

The problem is, once they've uploaded the PHP content, they need to create a MySQL database, which can only currently be done over the command-line or PHPMyadmin.

An interesting feature would allow a user to create a "database" file in the /srv/domain.tld/config directory, containing a user and password. Symbiosis would detect the presence of this file, and if a database named after the domain didn't already exist, would create a new database, and GRANT the right permissions to it allowing local access with the username/password in the file. The user could then install say, Wordpress with only SFTP.

Originally reported on Bytemark's Gitlab by @jiphex on 2016-08-10T11:39:18.395Z

patch0 commented 7 years ago

Yeah that's sensible enough. I'd aim to create @@common/lib/symbiosis/databases.rb@@ with some utilities for:

Then add a simple script to look for @@/srv//config/databases/@@ - for each one:

Originally posted by @skx on 2015-01-21T16:05:56.000Z

patch0 commented 7 years ago

Ideally nothing in Symbiosis would wait for cron to fire.

If cron is required, then please use a sane crontab named after the package.

Similarly if any binaries/scripts are needed, then name those after the package too.

e.g. symbiosis-mysql-configure

Ta!

Originally posted by @patch0 on 2015-01-21T16:02:39.000Z