Commit Graph

55 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
fa10fa6a47 feat: implement service filtering
If a user implements the user-auth-service trigger in a plugin and that plugin does not echo the passed in app(s) on stdout, the app is assumed to not exist. This mirrors the functionality for applications in regards to auth filtering.

This may still need auditing to ensure it covers everything and doesn't cause issues, but local testing implies that everything is working as expected.
2022-07-07 02:54:14 -04:00
Jose Diaz-Gonzalez
6fe30de9f2 chore: run shfmt 2019-05-30 11:06:25 -04:00
Jose Diaz-Gonzalez
f8c732ec22 feat: default to help output when no subcommand specified
Refs dokku/dokku-redis#95
2018-02-25 22:52:33 -05:00
Jose Diaz-Gonzalez
e03975062a feat: prepare ground for config directory changes 2017-09-11 03:52:56 -04:00
Jose Diaz-Gonzalez
e5bead2f82 feat: add support for enhanced help output 2017-09-11 01:25:25 -04:00
Jose Diaz-Gonzalez
21203f60e9 feat: Adds possibility to set encryption for s3 2017-09-09 14:29:58 -04:00
Jose Diaz-Gonzalez
110c7088b9 docs: destroy help now shows that data will be deleted 2017-08-27 18:43:19 -04:00
Jose Diaz-Gonzalez
4105e9042e fix: add missing argument to backup subcommand help output 2017-08-26 05:21:21 -04:00
Jose Diaz-Gonzalez
9e27f4928a Adds parameters to backup-auth for region support and non AWS endpoint support
Refs dokku/dokku-mariadb#61
2017-08-26 00:06:36 -04:00
Jose Diaz-Gonzalez
cc5fac0376 feat: add s3 backup support 2016-10-31 11:39:25 -06:00
Jose Diaz-Gonzalez
225d7f2e14 Make dokku help friendlier 2016-08-28 01:13:02 -04:00
Jose Diaz-Gonzalez
07e6a7d062 Always remove * directory 2016-05-23 21:13:07 -04:00
Jose Diaz-Gonzalez
fce29c7fc4 Move all commands into subcommand structure 2016-05-15 22:15:11 -04:00
Jose Diaz-Gonzalez
24ce96067f Upgrade help output for dokku 0.5.x
Also completely drop support for help output on 0.3.x
2016-05-15 19:13:18 -04:00
Jose Diaz-Gonzalez
2a33fda40f Move setting of PLUGIN_BASE_PATH to config 2016-05-15 18:36:13 -04:00
Jose Diaz-Gonzalez
6067516ea7 ensure we don't expand PLUGIN_DATA_ROOT 2016-05-08 14:58:11 -04:00
Jose Diaz-Gonzalez
3ce4c65705 quote docker pull call 2016-05-08 14:58:02 -04:00
Jose Diaz-Gonzalez
8049193f38 fix read call 2016-05-08 14:57:57 -04:00
Jose Diaz-Gonzalez
df1289d82e Move command check before DOKKU_TRACE to reduce trace output 2016-05-08 03:02:23 -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
54e24ab582 create container if not exists on service:start 2016-05-04 01:01:30 -04:00
Trey Thomas
604935e0bf Automatically pull image if it's not already downloaded 2016-04-18 16:45:37 -06:00
Edgars Beigarts
33b233aca0 Fix exit code for mysql:export when SSH_TTY is not present 2016-02-24 09:25:31 +02:00
Jose Diaz-Gonzalez
c555863d7a Remove invalid service directory during command runs
Refs dokku/dokku-mariadb#30
2016-01-17 21:29:44 -05:00
Alexey Zagarin
f1d589d164 secure passwords 2015-12-04 13:33:36 +03:00
Alexey Zagarin
ab65ac7f1f config dir & disable performance schema 2015-12-01 15:20:01 +03:00
Jose Diaz-Gonzalez
ad42950980 Add support for custom environment variables when starting a service container 2015-11-05 01:21:43 -05:00
Loïc Guitaut
3f789ad349 Fix export when using ssh -t 2015-10-19 11:38:45 +02:00
Loïc Guitaut
d09d7cedf0 Fix the destroy command
Checking for container with its service name instead of ID.
Doing a chmod 777 on `/data` before removing data from the service.
2015-10-12 11:05:55 +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
Jose Diaz-Gonzalez
077d87ed58 Add mysql:help command 2015-09-27 17:18:28 -04:00
Loïc Guitaut
7c867da3dc Use our own image to wait for services 2015-09-24 11:44:42 +02:00
Loïc Guitaut
5cced02b01 Do not always allocate a tty on connect 2015-09-21 10:15:00 +02:00
Loïc Guitaut
0e02670639 Fix compatibility with dokku 0.4+ 2015-09-16 23:49:45 +02:00
Loïc Guitaut
d8b13298b7 Add import, clone commands
Fix dump and connect commands
2015-09-14 17:09:08 +02:00
Loïc Guitaut
b5ec6ca12c Compatibility with dokku 0.3.x & 0.4.x for help output 2015-09-11 23:29:40 +02:00
Jose Diaz-Gonzalez
866c91791d Merge pull request #5 from Flink/lg-various-updates
Various updates
2015-09-10 10:47:23 -04:00
Loïc Guitaut
96189cbf0d Use a length of 16 chars for password
This is a MySQL limitation.
2015-09-10 00:52:43 +02:00
Loïc Guitaut
751964aa1f Use openssl rand to generate password
It should be more secure than hashing the current time.
2015-09-10 00:19:48 +02:00
Loïc Guitaut
d551fb2d63 Use aanand/wait image to wait for service to be ready 2015-09-09 19:13:54 +02:00
Loïc Guitaut
ecc5472aae Remove call to docker kill 2015-09-09 19:03:26 +02:00
Loïc Guitaut
382443d956 Use mysql tools from docker image 2015-09-09 09:51:44 +02:00
Loïc Guitaut
b3af1f96f2 Use $PLUGIN_PATH instead of dirname 2015-09-09 09:51:44 +02:00
Jose Diaz-Gonzalez
af59e8593e Fix connect and export commands. Closes #1 2015-09-07 01:36:17 -04:00
Jose Diaz-Gonzalez
3481b5a95f make test 2015-09-06 22:55:50 -04:00
Jose Diaz-Gonzalez
a9316bf1f8 Properly implement port expose/unexpose 2015-09-06 21:57:54 -04:00
Jose Diaz-Gonzalez
6557f711b0 Move alias, link, unlink and logs commands into functions 2015-08-29 03:19:35 -04:00
Jose Diaz-Gonzalez
a7543b5a31 Move service checks into commands file 2015-08-29 02:58:48 -04:00
Jose Diaz-Gonzalez
35c9ad5318 Move info and list commands into shared functions
Also add better output formatting for both commands
2015-08-29 02:53:16 -04:00
Jose Diaz-Gonzalez
e8fc3aaac8 use config for ports 2015-08-29 02:37:37 -04:00