devilbox icon indicating copy to clipboard operation
devilbox copied to clipboard

Add doc for project startup scripts

Open martin-rueegg opened this issue 2 years ago • 3 comments

Per-Project Start-up Scripts

Goal

Document the new functionality of supporting per-project startup scripts. Project-specific start-up scripts have the advantage to be stored and managed project-wide. So developers working on the same project, do not have to worry about the installation of those scripts. A common use case would be cron jobs that are required for CMS (e.g. WordPress based projects) and other web applications (e.g. nextcloud or humhub).

Description

With this and it's associated PRs (devilbox/docker-php-fpm#263 and devilbox/docker-php-fpm#264) there is the possibility of placing startup scripts that are project-specific (and hence can be managed project-wide on multiple developer instances) in the folder .devilbox/autostart under the project's root.

As such resolves #438

martin-rueegg avatar Dec 16 '22 17:12 martin-rueegg

Please note: I have no clue how the rst files are rendered. So I have adapted the file with common sense. Please let me know if there's something that needs to be changed. Same applies for the PRs on the docker-php-fpm project.

martin-rueegg avatar Dec 16 '22 17:12 martin-rueegg

@martin-rueegg thanks for the PR. I will give this a thorough review.

cytopia avatar Dec 18 '22 14:12 cytopia

@martin-rueegg thanks for the PR. I will give this a thorough review.

Awesome, thanks.

What came to my mind was that maybe there are some security considerations to be made: does there exist a possibility for a project to inject malicious code? Would it be necessary to either

  • enable the feature globally in .env, or
  • not having a global flag but a comma-separated list of directory names

to enable the feature?

martin-rueegg avatar Dec 18 '22 15:12 martin-rueegg