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

[TASK] Fix make scheduler cmd for TYPO3 >6.2 #162

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

tbal
Copy link
Contributor

@tbal tbal commented Jan 21, 2017

  • Determine path to typo3/cli_dispatch.phpsh by looking up
    WEB_DOCUMENT_ROOT env variable which is defined in
    etc/environment.yml and automatically available in
    the app container.
    This makes the 'make scheduler' command work for all
    TYPO3 versions.
  • Run container as application user to avoid permission problems.
  • Use docker-compose exec instead of docker exec,
    which speeds up the command call, because there is no
    need to determine the container id of the app container
    anymore.

Fixes #139

@tbal tbal mentioned this pull request Feb 16, 2017
@stucki
Copy link
Contributor

stucki commented Feb 17, 2017

This does still not work for me:

  1. The slash after $WEB_DOCUMENT_ROOT is superfluous and leads to warnings when running make scheduler
  2. The command exits with return code 129. This seems to be a known issue with docker-compose, see strange exit status code behavior docker/compose#3379

Below is a suggestion which fixes the issue on top of your change:

diff --git a/Makefile b/Makefile
index 6c08045..a97ab39 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,8 @@ root:
 #############################
 
 scheduler:
-       docker-compose exec --user application app /bin/bash -c '"$$WEB_DOCUMENT_ROOT"/typo3/cli_dispatch.phpsh scheduler $(ARGS)'
+       # TODO: remove the workaround "; (exit $?)" when https://github.com/docker/compose/issues/3379 has been fixed
+       docker-compose exec --user application app /bin/bash -c '"$$WEB_DOCUMENT_ROOT"typo3/cli_dispatch.phpsh scheduler $(ARGS); (exit $?)'
 
 #############################
 # Argument fix workaround

@tbal
Copy link
Contributor Author

tbal commented Feb 17, 2017

Thanks @stucki. I also sumbled upon code 129 in some other cases with docker-compose, but didn't recognized it here. Will integrate this the next days and check my other PRs if there is the need for this workaround too.

@stucki
Copy link
Contributor

stucki commented Feb 17, 2017

Great!

@mblaschke mblaschke changed the base branch from master to develop February 18, 2017 15:46
- Determine path to typo3/cli_dispatch.phpsh by looking up
  WEB_DOCUMENT_ROOT env variable which is defined in
  etc/environment.yml and automatically available in
  the app container.
  This makes the 'make scheduler' command work for all
  TYPO3 versions.
- Run container as application user to avoid permission problems.
- Use docker-compose exec instead of docker exec,
  which speeds up the command call, because there is no
  need to determine the container id of the app container
  anymore.

Fixes webdevops#139
@tbal
Copy link
Contributor Author

tbal commented Feb 18, 2017

Stuckis suggestion implemented.

@stucki
Copy link
Contributor

stucki commented Feb 18, 2017

Looks good to me, thank you!

@mblaschke mblaschke merged commit d9321bb into webdevops:develop Aug 28, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants