summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMark Raymond Jr <[email protected]>2019-08-05 15:38:30 -0700
committerKasra Bigdeli <[email protected]>2019-08-05 18:38:30 -0400
commit608e2c1715dcfa7e5af7bef9b58366ab8da619b6 (patch)
treece888f72e9d8f9e7118bd4ed9e738c327c10c6c1
parent2950b5111611384b1d619845c8ed61351de1eee5 (diff)
downloadcaprover-one-click-apps-608e2c1715dcfa7e5af7bef9b58366ab8da619b6.tar.gz
caprover-one-click-apps-608e2c1715dcfa7e5af7bef9b58366ab8da619b6.zip
Add template for Directus (#64)
* Add directus configuration file. * Change domain description line. * Fix SQL database password variables.
-rw-r--r--public/v1/apps/directus.json116
1 files changed, 116 insertions, 0 deletions
diff --git a/public/v1/apps/directus.json b/public/v1/apps/directus.json
new file mode 100644
index 0000000..8e5bf57
--- /dev/null
+++ b/public/v1/apps/directus.json
@@ -0,0 +1,116 @@
+{
+ "captainVersion": "1",
+ "documentation": "Taken from https://github.com/directus/docker.",
+ "dockerCompose": {
+ "version": "7",
+ "services": {
+ "$$cap_appname-db": {
+ "image": "mysql:5.7",
+ "notExposeAsWebApp": "true",
+ "volumes": [
+ "$$cap_appname-db-data:/var/lib/mysql/"
+ ],
+ "environment": {
+ "MYSQL_DATABASE": "$$cap_mysql_database_name",
+ "MYSQL_ROOT_PASSWORD": "$$cap_mysql_root_passwd",
+ "MYSQL_USER": "$$cap_mysql_user",
+ "MYSQL_PASSWORD": "$$cap_mysql_passwd"
+ },
+ "healthcheck": {
+ "test": "mysql -u$$cap_mysql_user -p$$cap_mysql_passwd -e \"SHOW DATABASES;\"",
+ "interval": "10s",
+ "timeout": "6s",
+ "retries": "10"
+ },
+ "restart": "always"
+ },
+ "$$cap_appname-api": {
+ "depends_on": {
+ "$$cap_appname-db": {
+ "condition" : "service_healthy"
+ }
+ },
+ "image": "directus/api:2.0.18",
+ "containerHttpPort":"80",
+ "restart": "always",
+ "environment": {
+ "DATABASE_HOST": "srv-captain--$$cap_appname-db",
+ "DATABASE_NAME": "$$cap_mysql_database_name",
+ "DATABASE_USERNAME": "$$cap_mysql_user",
+ "DATABASE_PASSWORD":"$$cap_mysql_passwd",
+ "ADMIN_EMAIL":"$$cap_directus_admin_username",
+ "ADMIN_PASSWORD":"$$cap_directus_admin_passwd"
+ }
+ },
+ "$$cap_appname-app": {
+ "depends_on": {
+ "$$cap_appname-db": {
+ "condition" : "service_healthy"
+ },
+ "$$cap_appname-api" : {}
+ },
+ "image": "directus/app:7.0.18",
+ "containerHttpPort":"80",
+ "restart": "always",
+ "environment": {
+ "API_ENDPOINT": "API; $$cap_api_endpoint/_/"
+ }
+ }
+ }
+ },
+ "instructions":{
+ "end":"Directus is deployed and available as $$cap_appname-app. \n\n It may take a few minutes for Directus to initialize.\n",
+ "start":"Directus is a free and open souce content management system and API wrapper for SQL databases. The API instance provides a realtime REST API for interacting with your database, while the App instance provides a web based CMS for managaging the database. \n For more information and available options, see https://github.com/directus/docker."
+ },
+ "variables":[
+ {
+ "description":"Name of the Directus backing database instance.",
+ "defaultValue" : "directus",
+ "id":"$$cap_mysql_database_name",
+ "label":"mySQL Database Name",
+ "validRegex": "/.{1,}/"
+ },
+ {
+ "description":"Master password for the Directus backing database instance.",
+ "defaultValue" : "ultr@s3curep@ssword",
+ "id":"$$cap_mysql_root_passwd",
+ "label":"mySQL Root Password",
+ "validRegex":"/^(?=.*\\d).{10,}$/"
+ },
+ {
+ "description":"User for the Directus backing database instance.",
+ "defaultValue" : "directus",
+ "id":"$$cap_mysql_user",
+ "label":"mySQL User",
+ "validRegex": "/.{1,}/"
+ },
+ {
+ "description":"User password for the Directus backing database instance.",
+ "defaultValue" : "s3curep@ssword",
+ "id":"$$cap_mysql_passwd",
+ "label":"mySQL User Password",
+ "validRegex":"/^(?=.*\\d).{10,}$/"
+ },
+ {
+ "description":"Admin login email for the Directus app.",
+ "defaultValue" : "[email protected]",
+ "id":"$$cap_directus_admin_username",
+ "label":"Directus App Admin Email",
+ "validRegex": "/.{1,}/"
+ },
+ {
+ "description":"Admin login password for the Directus app.",
+ "defaultValue" : "s3curep@ssword",
+ "id":"$$cap_directus_admin_passwd",
+ "label":"Directus App Admin Password",
+ "validRegex":"/^(?=.*\\d).{10,}$/"
+ },
+ {
+ "description":"A URL in the format of http://appname-api.rootdomain.com. \n The admin web app will connect to the endpoint using this URL.",
+ "id":"$$cap_api_endpoint",
+ "label":"Directus API Endpoint URL",
+ "validRegex": "/.{1,}/"
+ }
+ ]
+
+}