Label running containers
This will avoid issues where `dokku cleanup` removes the stopped containers (it should not do so, and instead should allow them to stay in stopped mode). Containers will be labeled as follows: - service: dokku=service dokku.service=SERVICE_NAME - ambassador: dokku=ambassador dokku.ambassador=SERVICE_NAME To destroy the containers, simply run the `service:destroy` command.
This commit is contained in:
2
commands
2
commands
@@ -36,7 +36,7 @@ case "$1" in
|
||||
|
||||
dokku_log_info1 "Starting container"
|
||||
SERVICE_NAME=$(get_service_name "$SERVICE")
|
||||
ID=$(docker run --name "$SERVICE_NAME" -v "$SERVICE_ROOT/data:/data" -v "$SERVICE_ROOT/config:/usr/local/etc/redis" -d --restart always "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION")
|
||||
ID=$(docker run --name "$SERVICE_NAME" -v "$SERVICE_ROOT/data:/data" -v "$SERVICE_ROOT/config:/usr/local/etc/redis" -d --restart always --label dokku=service --label dokku.service=redis "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION")
|
||||
echo "$ID" > "$SERVICE_ROOT/ID"
|
||||
|
||||
dokku_log_verbose_quiet "Waiting for container to be ready"
|
||||
|
||||
Reference in New Issue
Block a user