Simple database creator
|Assignee:||Steve Kemp||% Done:|
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.
#2 Updated by Patrick Cherry almost 5 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
Similarly if any binaries/scripts are needed, then name those after the
#3 Updated by Steve Kemp almost 5 years ago
Yeah that's sensible enough. I'd aim to create
@common/lib/symbiosis/databases.rb@ with some utilities for:
- creating a database.
- testing a database exists.
- deleting a database.
Then add a simple script to look for
@/srv/*/config/databases/*@ - for each one:
- if it doesn't exist
- the create.
- do nothing.