From 5b107ce44d55bc565608238989543479479fb7df Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Tue, 8 Jan 2019 22:06:30 -0800 Subject: [PATCH] more one click apps --- one-click-apps/v1/adminer.json | 1 + one-click-apps/v1/couchdb.json | 5 ++ one-click-apps/v1/mongo-express.json | 82 ++++++++++++++++++++++++++++ one-click-apps/v1/mongodb.json | 51 +++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 one-click-apps/v1/mongo-express.json create mode 100644 one-click-apps/v1/mongodb.json diff --git a/one-click-apps/v1/adminer.json b/one-click-apps/v1/adminer.json index 61394b9..4415bd4 100644 --- a/one-click-apps/v1/adminer.json +++ b/one-click-apps/v1/adminer.json @@ -21,6 +21,7 @@ "ADMINER_DESIGN": "$$cap_adminer_design" } } + } }, "instructions":{ "start":"Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB. \n\n For more details, see: https://github.com/vrana/adminer\n\n Enter your Adminer Configuration parameters and click on next. It will take about a minute for the process to finish.", diff --git a/one-click-apps/v1/couchdb.json b/one-click-apps/v1/couchdb.json index 8e5cb7f..0a9ce67 100644 --- a/one-click-apps/v1/couchdb.json +++ b/one-click-apps/v1/couchdb.json @@ -9,6 +9,10 @@ "$$cap_appname": { "image": "couchdb:$$cap_couchdb_version", + "volumes": [ + "$$cap_appname-db-data:/opt/couchdb/data", + "$$cap_appname-db-etc:/opt/couchdb/etc" + ], "restart": "always", "environment": { @@ -16,6 +20,7 @@ "ADMINER_DESIGN": "$$cap_couchdb_password" } } + } }, "instructions":{ "start":"CouchDB is a database that uses JSON for documents, an HTTP API, & JavaScript/declarative indexing.\n\n After installation on CaptainDuckDuck, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 5984 to other CaptainDuckDuck apps.\n\nEnter your CouchDB Configuration parameters and click on next. It will take about a minute for the process to finish.", diff --git a/one-click-apps/v1/mongo-express.json b/one-click-apps/v1/mongo-express.json new file mode 100644 index 0000000..6c9a348 --- /dev/null +++ b/one-click-apps/v1/mongo-express.json @@ -0,0 +1,82 @@ +{ + "captainVersion": "1", + "documentation": "Taken from https://hub.docker.com/_/mongo-express/ except it is manually adjusted for port 80", + "dockerCompose": + { + "version": "3.3", + "services": + { + "$$cap_appname": + { + "dockerfileLines": [ + "FROM mongo-express:$$cap_mongoexpress_version", + "ENV VCAP_APP_PORT=80", + "EXPOSE 80" + ], + "restart": "always", + "environment": + { + "ME_CONFIG_MONGODB_SERVER": "$$cap_me_server_address", + "ME_CONFIG_MONGODB_ADMINUSERNAME": "$$cap_me_server_admin_username", + "ME_CONFIG_MONGODB_ADMINPASSWORD": "$$cap_me_server_admin_password", + "ME_CONFIG_MONGODB_PORT": "$$cap_me_server_port", + "ME_CONFIG_BASICAUTH_USERNAME": "$$cap_me_dashboard_username", + "ME_CONFIG_BASICAUTH_PASSWORD": "$$cap_me_dashboard_password", + "ME_CONFIG_SITE_COOKIESECRET": "$$cap_appname$$cap_mongoexpress_version", + "ME_CONFIG_SITE_SESSIONSECRET": "$$cap_appname$$cap_mongoexpress_version" + } + } + } + }, + "instructions":{ + "start":"MongoExpress is a Web-based MongoDB admin interface, written with Node.js and express. See MongoExpress page for more details: https://github.com/mongo-express/mongo-express\n\n Enter your MongoExpress Configuration parameters and click on next. It will take about a minute for the process to finish.", + "end":"MongoExpress is deployed and available as $$cap_appname" + }, + "variables": [ + { + "id": "$$cap_mongoexpress_version", + "label": "Mongo Express Version Tag", + "description": "Checkout their docker page for the valid tags https://hub.docker.com/r/library/mongo-express/tags/", + "defaultValue": "latest", + "validRegex": "/^([a-zA-Z0-9-.])+$/" + }, + { + "id": "$$cap_me_server_address", + "label": "MongoDB Server Address", + "description": "If MongoDB is created by CaptainDuckDuck, use srv-captain--REPLACE_THIS_WITH_CONTAINER_NAME", + "validRegex": "/.{1,}/" + }, + { + "id": "$$cap_me_server_port", + "label": "MongoDB Server Port (default is 27017)", + "defaultValue": "27017", + "validRegex": "/^([0-9])+$/" + }, + { + "id": "$$cap_me_server_admin_username", + "label": "MongoDB Admin Username", + "defaultValue": "", + "validRegex": "/.{1,}/" + }, + { + "id": "$$cap_me_server_admin_password", + "label": "MongoDB Admin Password", + "defaultValue": "", + "validRegex": "/.{1,}/" + }, + { + "id": "$$cap_me_dashboard_username", + "label": "Choose a Mongo-Express Dashboard Username", + "defaultValue": "admin", + "description": "Restrict access to your Mongo Express dashboard by choosing username/pass", + "validRegex": "/^([a-zA-Z0-9])+$/" + }, + { + "id": "$$cap_me_dashboard_password", + "label": "Mongo-Express Dashboard Password", + "defaultValue": "", + "description": "Restrict access to your Mongo Express dashboard by choosing username/pass", + "validRegex": "/^([a-zA-Z0-9])+$/" + }] + +} diff --git a/one-click-apps/v1/mongodb.json b/one-click-apps/v1/mongodb.json new file mode 100644 index 0000000..1516cc8 --- /dev/null +++ b/one-click-apps/v1/mongodb.json @@ -0,0 +1,51 @@ +{ + "captainVersion": "1", + "documentation": "Taken from https://hub.docker.com/r/mongo/", + "dockerCompose": + { + "version": "3.3", + "services": + { + "$$cap_appname": + { + "image": "mongo:$$cap_mongo_version", + "volumes": [ + "$$cap_appname-db-data:/data/db", + "$$cap_appname-db-config:/data/configdb" + ], + "restart": "always", + "environment": + { + "MONGO_INITDB_ROOT_USERNAME": "$$cap_mongo_username", + "MONGO_INITDB_ROOT_PASSWORD": "$$cap_mongo_password" + } + } + } + }, + "instructions":{ + "start":"Parse Server is an open source version of the Parse backend that can be deployed to any infrastructure that can run Node.js. For more information on Parse platform see http://parseplatform.org\n\n Enter your Parse Configuration parameters and click on next. A MongoDB (database) and a Parse container will be created for you. The process will take about a minute for the process to finish.", + "end":"Parse is deployed and available as $$cap_appname-parse." + }, + "variables": [ + { + "id": "$$cap_mongo_version", + "label": "MongoDB Version", + "defaultValue": "4", + "description": "Checkout their docker page for the valid tags https://hub.docker.com/r/library/mongo/tags/", + "validRegex": "/^([a-zA-Z0-9])+$/" + }, + { + "id": "$$cap_mongo_username", + "label": "MongoDB RootUsername", + "defaultValue": "root", + "description": "Only use alphanumeric chars.", + "validRegex": "/^([a-zA-Z0-9])+$/" + }, + { + "id": "$$cap_mongo_password", + "label": "MongoDB password", + "description": "Only use alphanumeric chars.", + "validRegex": "/^([a-zA-Z0-9])+$/" + }] + +}