From 728456e7c73902c162ebf814ac88d62b8fa9a00e Mon Sep 17 00:00:00 2001 From: Thomas Jensen <44089656+thomasjensen1194@users.noreply.github.com> Date: Tue, 6 Aug 2019 00:40:11 +0200 Subject: [PATCH] Added MariaDB (#76) * Added MariaDB * Set fixed value for default version * Added character sets setting --- public/v1/apps/mariadb.json | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 public/v1/apps/mariadb.json diff --git a/public/v1/apps/mariadb.json b/public/v1/apps/mariadb.json new file mode 100644 index 0000000..5ee1414 --- /dev/null +++ b/public/v1/apps/mariadb.json @@ -0,0 +1,52 @@ +{ + "captainVersion": "1", + "documentation": "Taken from https://hub.docker.com/_/mariadb.", + "dockerCompose": { + "version": "3.1", + "services": { + "$$cap_appname-db": { + "dockerfileLines": [ + "FROM mariadb:$$cap_mysql_version", + "CMD [\"--character-set-server=$$cap_charset\", \"--collation-server=$$cap_collation\", \"--skip-character-set-client-handshake\"]" + ], + "notExposeAsWebApp": "true", + "volumes": ["$$cap_appname-db-data:/var/lib/mariadb"], + "restart": "always", + "environment": { + "MYSQL_ROOT_PASSWORD": "$$cap_db_pass" + } + } + } + }, + "instructions": { + "start": "MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. Being a fork of a leading open source software system, it is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle. Contributors are required to share their copyright with the MariaDB Foundation. The intent is also to maintain high compatibility with MySQL, ensuring a \"drop-in\" replacement capability with library binary equivalency and exact matching with MySQL APIs and commands. It includes the XtraDB storage engine for replacing InnoDB, as well as a new storage engine, Aria, that intends to be both a transactional and non-transactional engine perhaps even included in future versions of MySQL.", + "end": "MariaDB has been successfully deployed. The database is accessable on port 3306 inside the container. If you need to access the database externally, you will have to setup port mapping in the App configs tab. For example serverport: 3306, containerport: 3306. You can change the serverport for connection, but the containerport is predefined." + }, + "variables": [ + { + "id": "$$cap_mysql_version", + "label": "MariaDB Version", + "defaultValue": "10.4", + "description": "Check out their docker page for the valid tags https://hub.docker.com/_/mariadb?tab=tags", + "validRegex": "/^([^\\s^\\/])+$/" + }, + { + "id": "$$cap_db_pass", + "label": "MariaDB Root password", + "description": "", + "validRegex": "/.{1,}/" + }, + { + "id": "$$cap_charset", + "label": "Default server character set", + "description": "See the MariaDB website for supported character sets (https://mariadb.com/kb/en/library/supported-character-sets-and-collations/#character-sets)", + "defaultValue": "utf8mb4" + }, + { + "id": "$$cap_collation", + "label": "Default server collation", + "description": "See the MariaDB website for supported collations (https://mariadb.com/kb/en/library/supported-character-sets-and-collations/#collations)", + "defaultValue": "utf8mb4_unicode_ci" + } + ] +}