110 Commits

Author SHA1 Message Date
Komlan KEDJI
6577443afb fix: set ON_ERROR_STOP=1 for psql, so calling scripts get an exit status
Currently, using `postgres:connect` with a script passed in through stdin, there is no way to know if the script failed or not.

This change aligns the behavior with eaa1c35769/docker-entrypoint.sh (L196) which returns an exit status.
2024-09-24 10:06:47 +00:00
Piero Dotti
23c11bfddd fix(service_create_container): using SERVICE_ROOT instead of SERVICE_HOST_ROOT when creating the ssl certs
Since the script create_ssl_certs.sh is executed from inside the container, the directory is not the host one, but the container one.
2023-08-16 14:16:58 +02:00
Jose Diaz-Gonzalez
bfc0f18759 Release 1.34.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2023-05-28 01:00:01 -04:00
josegonzalez
9f3d24ca9f Merge branch 'master' into master 2023-05-27 19:45:41 -04:00
Jose Diaz-Gonzalez
bbc7b0fc71 fix: show an error when an ambassador container already exists but we don't have expose configuration
Closes dokku/dokku-redis#200
2023-02-25 20:10:37 -05:00
Jose Diaz-Gonzalez
a1090e23dc fix: use network alias when linking to wait container 2023-02-08 23:59:22 -05:00
Jose Diaz-Gonzalez
09f022086a fix: drop extra check and always use the same network alias 2023-02-08 18:30:12 -05:00
Jose Diaz-Gonzalez
5479a2b0c9 refactor: use the same network alias as is used when running :link command
This allows for some degree of parity as the network will now resolve the same for both linked and networked containers.
2023-02-08 17:08:08 -05:00
Jose Diaz-Gonzalez
91ff698a68 fix: use correct alias for non-initial-network connect calls 2023-02-08 12:08:26 -05:00
Jose Diaz-Gonzalez
00bc6ea144 fix: always use the network alias 2023-02-08 12:06:57 -05:00
Jose Diaz-Gonzalez
44fe34fdfa fix: set correct alias for wait container when not using an initial network 2023-02-08 11:53:45 -05:00
Jose Diaz-Gonzalez
a88e34088d feat: use service name as hostname 2023-02-08 11:01:02 -05:00
Jose Diaz-Gonzalez
18cd825539 feat: add network alias that is $SERVICE_NAME.$SERVICE_TYPE
This alias is in addition to the existing dokku.$SERVICE_TYPE.$SERVICE_NAME network alias that is derived from the hostname.
2023-02-08 11:00:01 -05:00
Jose Diaz-Gonzalez
6dc8e57024 fix: correct imports 2023-02-08 01:42:07 -05:00
Jose Diaz-Gonzalez
07065e9a06 feat: add service container log output on failure to start 2023-02-08 01:21:00 -05:00
Jose Diaz-Gonzalez
f101842fe1 fix: suppress output only if there are no errors 2023-02-07 22:22:24 -05:00
Jose Diaz-Gonzalez
36cd07ec8b feat: add ability to set multiple, comma-delimited post-create and post-start networks 2023-02-07 18:34:30 -05:00
Jose Diaz-Gonzalez
ae0d21180a feat: add support for attaching to networks after service container creation and start 2023-02-07 18:34:30 -05:00
Jose Diaz-Gonzalez
9a8b835a19 refactor: directly write out the cid file when creating the service container 2023-02-07 18:34:30 -05:00
Jose Diaz-Gonzalez
ad9b22837a fix: correct issue with checking if the service container is ready when using an initial-network 2023-02-07 18:34:30 -05:00
Jose Diaz-Gonzalez
434cca5aeb feat: add support for specifying an initial-network property
This network is the network that is associated with the container on creation. If specified, then the bridge network is not attached to the service.

Only a single initial network can be specified at this time.
2023-02-07 18:34:30 -05:00
Jose Diaz-Gonzalez
03e4c519f1 refactor: use DOCKER_BIN env var instead of calling docker directly
This will allow us to alias the docker binary with podman for most actions - other than updating running containers.
2023-02-07 03:53:08 -05:00
Jose Diaz-Gonzalez
0c04ad8dcb refactor: use namespaced docker commands for interacting with the docker binary 2023-02-07 03:39:42 -05:00
Jose Diaz-Gonzalez
3f338c7985 feat: add :pause subcommand and make :stop subcommand actually remove the container 2022-12-26 18:21:10 -05:00
Komlan KEDJI
09926fbecd fix: create ssl certs outside container
This enables support for alpine-based images like timescaledb (no bash/openssl).

Fixes #153
Fixes timescale/timescaledb-docker#99
2022-09-04 09:37:10 +00:00
Jose Diaz-Gonzalez
140639917d refactor: set the plugin name as the first argument to the service-action trigger
This is a breaking change, but is necessary as otherwise it is impossible to know which datastore plugin a team is meant for.
2022-07-10 15:29:11 -04:00
Jose Diaz-Gonzalez
4696033532 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
8b002c7a7c fix: do not create the new database automatically
This should only be done if importing a given database. Instead, always import into the specified database name.

Refs #218
2021-09-13 02:59:01 -04:00
Jose Diaz-Gonzalez
7ca7c20ef8 fix: pin the image and image version of a created service at creation time
This will help ensure that users upgrading to a new plugin version who stop/start databases will always get the same version. This is particularly important for datastores such as elasticsearch and postgres that have more involved upgraded processes.
2021-09-13 02:28:41 -04:00
Jose Diaz-Gonzalez
3ab20b0b4f feat: allow setting shm-size on created containers
Refs dokku/dokku-postgres#188
Closes dokku/dokku-postgres#201
2021-09-13 00:46:48 -04:00
Jose Diaz-Gonzalez
0387c2d30b feat: restore the imported database to the service's database
Refs #207
2021-09-12 23:48:10 -04:00
Jose Diaz-Gonzalez
1afdffef8d feat: add ability to set container config options during create/clone/upgrade actions
Also add to documentation where possible.

Closes dokku/dokku-mongo#131
2021-09-12 22:16:14 -04:00
Jose Diaz-Gonzalez
38bfaea286 fix: allow non-english characters in :connect shell
Closes dokku/dokku-mysql#116
2021-09-12 08:24:58 -04:00
Jose Diaz-Gonzalez
e85d96b3a1 feat: add the ability to constrain memory on service start/clone
Refs dokku/dokku-redis#86
2021-09-12 07:43:02 -04:00
Jose Diaz-Gonzalez
25ab99a4e2 chore: show a better error message when the image is missing
Refs dokku/dokku-clickhouse#4
2021-09-12 00:54:24 -04:00
Jose Diaz-Gonzalez
76cfd9a091 feat: add plugin trigger for service creation and deletion 2021-02-25 19:54:59 -05:00
Jose Diaz-Gonzalez
dccd7e7f89 feat: move all image names to config file
This allows us to more quickly update the image versions in use for tertiary images.
2020-03-31 01:36:28 -04:00
Jose Diaz-Gonzalez
7f4c06d6c0 chore: update dokku/wait version 2019-12-27 16:57:13 -05:00
Jose Diaz-Gonzalez
5b13bedbd6 chore: move to helper functions for fetching passwords 2019-07-11 16:34:35 -07:00
Jose Diaz-Gonzalez
93dd4fecbb feat: update ambassador, s3backup, and wait images 2019-07-11 14:31:47 -07:00
Jose Diaz-Gonzalez
7faec70ef2 fix: ensure the tracked container id is up to date
If the ID file contained an incorrect value, calling :start would say the service is started but :info would still show the container as missing.

Also fix an issue where docker inspect leaked stderr when the container was missing.

Refs dokku/dokku-redis#133
2019-06-11 15:44:54 -04:00
Jose Diaz-Gonzalez
028d82517f 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
a9fcde1404 chore: run shfmt 2019-05-30 11:06:25 -04:00
Jose Diaz-Gonzalez
181a1a18fa feat: switch to updated wait image 2019-03-25 12:46:42 -04:00
Jose Diaz-Gonzalez
5a541fc340 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:36 -04:00
Jose Diaz-Gonzalez
ec4e5b4a43 fix: correct the validation message 2019-03-09 16:39:35 -05:00
Jose Diaz-Gonzalez
233a261a3f 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:23 -05:00
Jose Diaz-Gonzalez
fe3d4d6329 chore: minor consolidation in functions files 2019-03-09 15:54:23 -05:00
Jose Diaz-Gonzalez
26a1948e50 Update functions 2018-12-02 05:13:34 -05:00
Jose Diaz-Gonzalez
11435f7452 Merge branch 'master' into bug/ps/grep/binary 2018-12-02 04:57:41 -05:00