Directus Snapshot
NOTE: DO NOT USE THIS DIRECTLY
This script will generate a snapshot which in turn is being distributed through the DigitalOcean Marketplace. This repo can not be used directly.
This project creates a Directus snapshot on DigitalOcean containing a LAMP stack preconfigured with Directus. Once a droplet is created from the snapshot (or using the marketplace), the MySQL server is configure and on login, a quick MOTD will give all the information the user needs to continue the setup from directus admin panel.
Software Requirements
doctlDigitalOcean's CLIpackerPacker CLIbashBash 4+curl
Building
First make sure all the software requirements are installed and accessible in $PATH.
Create a .env file containing a DIGITALOCEAN_API_TOKEN variable with your DigitalOcean API token. This is required to gain access to your account. You should also login through doctl CLI and make sure you can list your snapshots through doctl --access-key "${DIGITALOCEAN_API_TOKEN}" compute snapshot list command.
Now you can run the build script in ./bin/build. The latest version of directus will be fetched automatically, but if you want to build a snapshot for a specific version, you can pass --version argument to the build script. For example ./bin/build --version v8.4.0.
After the build is done, a snapshot will be available on your DigitalOcean account.
Testing
You can pass --test flag to ./bin/build if you want to automate some quick tests on the target snapshot. This will instantiate a new Droplet (lowest config) in your account and check for network access, and if Directus is answering properly the ping endpoint.
Note that any errors during tests will keep the droplet in your account. In this case you should manually destroy it through DigitalOcean's admin interface or doctl command.
The droplet will be named directus-snapshot-{version}-test.