Commit Graph

60 Commits

Author SHA1 Message Date
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
Peter West
d1a1450b48 Rename DATABASE_SCHEME to MYSQL_DATABASE_SCHEME 2016-03-19 10:17:48 +00:00
Peter West
90791f536a Change DATABASE_ADAPTER to DATABASE_SCHEME 2016-03-08 09:03:20 +00:00
Peter West
ab7cc8c1a1 Use config_get from config functions 2016-03-04 12:37:02 +00:00
Peter West
b7b25c91a0 Read DATABASE_ADAPTER variable from app when setting DATABASE_URL 2016-03-04 12:37:02 +00:00
Loïc Guitaut
318c3afb03 Display infos from list command in columns
Also add a LINKS column to easily view which services are linked to
which apps
2015-10-13 10:29:39 +02:00
Loïc Guitaut
13329f3e42 Revamp link/unlink commands
Previously we were exporting `DATABASE_URL` via the docker-args* hooks.
This seems to confuse our users (since the env var is not displayed
when calling `dokku config`) and in some cases it also seems that the
env var is not correctly set.
Another problem is if several services are linked to the same app and
if they are exporting `DATABASE_URL` as well. Then we don’t know what
will be set.

To resolve theses issues, this patch changes the way we manage the env
vars. We use standard dokku commands (`config` and `docker-options`) so
config is set on the linked application and can be reviewed by the user
easily.
We also handle the case where `DATABASE_URL` is already set on the
linked application. When it’s the case, we automatically generate
another env var based on the following pattern: DOKKU_<service
name>_<random unused color>_URL. For example, this can give:
DOKKU_MYSQL_BLACK_URL.

Since naming is now handled automatically, the `alias` command has been
removed. If the user wants to set a different env var on her app, it’s
just a matter of using `dokku config:set` and pasting the wanted value.

IP in DSN has been removed in favor of host name exported by docker in
the container. This is more robust and simpler since the IP can change
but the name will remain the same if the service container restarts for
instance.

With all those changes, a new command has been introduced: `promote`.
The goal of this command is to easily set a service as the primary one
when several are linked to an app. (see README for an example)
2015-09-30 23:05:16 +02:00
Loïc Guitaut
21a5d29581 Display image & version in list 2015-09-16 17:45:25 +02:00