Commit Graph

67 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
ce916eb846 feat: re-allow dashes in names
This PR allows dashes in service names, while still sanitizing them before they are used as database names. If the datastore is pre-existing, the datatabase name is assumed to be the same as the service name, and returned appropriately.
2019-05-30 17:03:48 -04:00
Jose Diaz-Gonzalez
6fe30de9f2 chore: run shfmt 2019-05-30 11:06:25 -04:00
Jose Diaz-Gonzalez
686f692cb2 feat: switch to updated wait image 2019-03-25 12:46:42 -04:00
Jose Diaz-Gonzalez
be0dbe5c5c fix: correct handling of container retrieval
In the previous method, if the container was renamed or there were multiple names attached to the container, fetching the container ID would fail as the regex would only match at the end. Instead of using grep, use the docker 'filter' functionality to fetch the container ID as appropriate.
2019-03-25 12:37:35 -04:00
Jose Diaz-Gonzalez
fc3f6a8a52 fix: correct the validation message 2019-03-09 16:39:34 -05:00
Jose Diaz-Gonzalez
1551ec61e7 fix: Strictly validate service names
We previously allowed a wide range of service names. As the service name is sometimes used to name databases, the name was actually more restricted than any character, resulting in services that wouldn't start. Going forward, only alphanumeric and underscore characters are allowed.

This only impacts service creation. Any services with invalid names should be migrated to a new service, with the data exported and imported as normal.

Closes dokku/dokku-redis#99
Closes dokku/dokku-mysql#47
Closes dokku/dokku-mongo#86
Closes dokku/dokku-redis#81
2019-03-09 15:54:21 -05:00
Jose Diaz-Gonzalez
1b797f8024 chore: minor consolidation in functions files 2019-03-09 15:54:21 -05:00
Jose Diaz-Gonzalez
39a7864022 fix: correct issues where docker ps is truncated
This should actually be refactored to avoid the grep call completely, but the current fix will correct the issue for now.

Refs dokku/dokku-postgres#131
2018-12-02 14:29:24 -05:00
Jose Diaz-Gonzalez
284ffa3177 feat: add ability to upgrade service image and image-version 2018-10-10 00:13:59 -04:00
Jose Diaz-Gonzalez
c83e0a56d2 refactor: make variable as dns hostname more clear 2018-04-24 02:54:46 -04:00
Jose Diaz-Gonzalez
02b0c1c7f9 refactor: move unimplemented command detection into config file 2018-04-24 00:27:17 -04:00
Jose Diaz-Gonzalez
94221b71ce refactor: allow usage of the same variable to disable docker pulls 2018-04-23 06:56:41 -04:00
Jose Diaz-Gonzalez
606fc7f9be feat: use custom env var to disable pull actions 2018-04-11 15:11:39 -04:00
Jose Diaz-Gonzalez
793087097d feat: support a separate data root for Docker bind mounts
This does not fix the :backup subcommand, which uses a temporary directory mounted to /backup.
2018-04-10 23:22:30 -04:00
Dheeraj Panyam
f92d6c2120 Update functions 2018-02-18 12:28:04 +05:30
Dheeraj Panyam
397a349b23 service_import ( change user from mysql to root)
change user from mysql to root
2018-02-18 10:26:50 +05:30
Dheeraj Panyam
b3e7735d0d service_import()
service_import() {
  local SERVICE="$1"
  SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
  SERVICE_NAME="$(get_service_name "$SERVICE")"
  ROOTPASSWORD="$(cat "$SERVICE_ROOT/ROOTPASSWORD")"

  if [[ -t 0 ]]; then
    dokku_log_fail "No data provided on stdin."
  fi
  docker exec -i "$SERVICE_NAME" mysql --user=mysql --password="$ROOTPASSWORD" "$SERVICE"
}
2018-02-17 23:42:50 +05:30
Jose Diaz-Gonzalez
e5bead2f82 feat: add support for enhanced help output 2017-09-11 01:25:25 -04:00
Jose Diaz-Gonzalez
afcfc0253c feat: add ability to specify custom flags on clone/create
Refs dokku/dokku-redis#64
2017-08-26 18:10:31 -04:00
Youri van der Lans
db956c3bbf Suppress mysqldump password error. 2017-03-14 14:50:43 +01:00
Jose Diaz-Gonzalez
cc5fac0376 feat: add s3 backup support 2016-10-31 11:39:25 -06:00
Tomas Srna
e979c8d414 Use utf8 character set as default 2016-10-10 11:41:14 +02:00
Jose Diaz-Gonzalez
85ceaee1d1 Pin dokkupaas/wait:0.2 2016-09-21 01:27:01 -06:00
Jose Diaz-Gonzalez
757ae311f9 Move link creation up 2016-08-29 10:47:23 -04:00
Jose Diaz-Gonzalez
87084e7135 Refactor common functions into separate file 2016-08-29 02:36:09 -04:00
Jose Diaz-Gonzalez
ff5459d299 Add --internal-ip flag to info command 2016-08-28 23:24:20 -04:00
Jose Diaz-Gonzalez
0b7be2d039 Fix expose tests 2016-08-28 22:15:07 -04:00
Jose Diaz-Gonzalez
f7d461fbf9 Document exposed ports when an invalid number of arguments are specified 2016-08-28 21:24:48 -04:00
Jose Diaz-Gonzalez
1841aa258c Add --id flag 2016-08-28 17:55:51 -04:00
Jose Diaz-Gonzalez
7a8d24931a Add support for flags on the service:info command 2016-08-28 05:37:34 -04:00
Jose Diaz-Gonzalez
2c26bf8896 Use cat and double-quotes when retrieving the password 2016-08-27 01:34:58 -04:00
Jose Diaz-Gonzalez
1eb8d990e2 Add missing SERVICE_ROOT env var 2016-08-27 01:10:32 -04:00
Jose Diaz-Gonzalez
37dcf26ba8 Output the config/data directories when performing service:info 2016-08-27 00:57:08 -04:00
Jose Diaz-Gonzalez
01210083dc Only wait for a single port 2016-08-26 23:05:27 -04:00
Jose Diaz-Gonzalez
e58c187889 Fix calls to docker-options plugin under all 0.4.x releases 2016-06-09 12:31:42 -04:00
Jose Diaz-Gonzalez
2a2132eb0b Alphabetize functions to improve organization 2016-05-16 02:28:41 -04:00
Jose Diaz-Gonzalez
69779da97d Remove remaining direct dokku calls 2016-05-16 00:24:38 -04:00
Jose Diaz-Gonzalez
f1731bac00 Remove call to dokku service:info in favor of service_info 2016-05-15 19:36:08 -04:00
Jose Diaz-Gonzalez
3e4409fcfb Use docker-options functions directly to avoid setting DOKKU_APP_NAME twice 2016-05-15 19:29:45 -04:00
Jose Diaz-Gonzalez
4e32b0a154 Revert "Escape dashed names for older versions of mysql"
This reverts commit 47398f84d6.
2016-05-12 12:05:02 -04:00
Jose Diaz-Gonzalez
b448a83c1e quote SERVICE_NAME value 2016-05-08 15:00:01 -04:00
Jose Diaz-Gonzalez
14c5dc8ebe use an extension for sed calls on os x 2016-05-08 14:59:51 -04:00
Jose Diaz-Gonzalez
4bddb3954c trim whitespace from url 2016-05-08 14:59:20 -04:00
Jose Diaz-Gonzalez
6cebc4c92e shellcheck disable 2016-05-08 14:59:10 -04:00
Jose Diaz-Gonzalez
d6582fe3b0 use config functions properly 2016-05-08 14:58:54 -04:00
Jose Diaz-Gonzalez
424a725c8d Quote more variables 2016-05-08 03:02:42 -04:00
Jose Diaz-Gonzalez
ca5421012b quote $APP variable 2016-05-08 03:02:15 -04:00
Jose Diaz-Gonzalez
11615bea77 Rework how config vars are sourced
- ensure we source config/functions from the correct directory
- move config sourcing up before DOKKU_TRACE to reduce trace output
2016-05-08 03:01:59 -04:00
Jose Diaz-Gonzalez
47398f84d6 Escape dashed names for older versions of mysql
Closes #47
Closes #48
2016-05-04 02:12:51 -04:00
Jose Diaz-Gonzalez
54e24ab582 create container if not exists on service:start 2016-05-04 01:01:30 -04:00