Skip to content

[Feature] Dynamic entrypoints folder #462

@back-2-95

Description

@back-2-95

Is your feature request related to a problem?

If using party (we) would like to add custom entrypoint scripts, we would need to copy and modify the original entrypoint script AND then detect any future changes.

But there could be a path where additional custom entrypoint scripts would be loaded and executed e.g. after startup scripts in https://github.com/mautic/docker-mautic/blob/main/common/docker-entrypoint.sh#L44

There could be even own folder for role based custom entrypoint scripts.

Describe the solution you'd like

#!/bin/bash

# It just sources all files within /entrypoints/* in an alphabetical order

set -e

if [ -d /entrypoints ]; then
  for i in /entrypoints/*; do
    if [ -r "$i" ]; then
      echo "# Source $i"
      . "$i"
    else
      echo "! $i not sourced"
    fi
  done
  unset i
fi

Describe alternatives you've considered (Optional)

No response

Additional Context (Optional)

No response

Acknowledgements

  • I agree to follow this project's Code of Conduct
  • This issue is NOT a security vulnerability. (Security vulnerabilities should be reported via the Security tab.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs prThe issue is valid but it needs a PR to address it. Please check the contribution guide!
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions