Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support option to not fork HSQL or Tomcat Processes #314

Open
mrapczynski opened this issue Apr 17, 2019 · 1 comment
Open

Support option to not fork HSQL or Tomcat Processes #314

mrapczynski opened this issue Apr 17, 2019 · 1 comment

Comments

@mrapczynski
Copy link

Is your feature request related to a problem? Please describe.
No, not a problem. I am using Docker to package pre-built developer environments. The embedded HSQL database or Tomcat spawn independent child processes, and this presents unique challenges when trying to do process coordination within a Docker container. The default spawn: true is fine for most situations, but there are circumstances when it would be nice to override this.

To sum it up: define an option for the HSQL or Tomcat tasks to create foreground processes while retaining the existing conveniences of the Gradle task config.

Describe the solution you'd like
Replace spawn: true for the hsqlStart and tomcatStart tasks with (project.findProperty('antNoSpawn') == 'true') ? false : true

Describe alternatives you've considered
Hacky Bash scripting inside the containers. It can work, but emphasis on how hacky it is.

Additional context
Allowing the Gradle tasks to create foreground processes would allow easier process coordination with tools such as Supervisord or Monit (inside or outside of a container environment).

Tested with the following scenarios:

  1. ./gradlew --console=plain -PantNoSpawn=true hsqlStart and
  2. ./gradlew --console=plain hsqlStart
@drewwills
Copy link
Contributor

👍 This sounds like a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants