chrismytton / shoreman Goto Github PK
View Code? Open in Web Editor NEW:shell: foreman in shell
License: MIT License
:shell: foreman in shell
License: MIT License
Would there be any chance we can get colored output with shoreman? Stuff is starting to bleed together.
Hello,
This is not really an issue, but I can't find the button to send a message in github anymore (I suppose they removed it).
This is about the documentation that says you need to install Roundup in order run to tests.
I think your Makefile uses a script that removes this mandatory step.
I might be wrong, which is why I did not do a pull request.
Hopefully I'll do more useful contributions to shoreman in the future :-)
I really like it, and the use of roundup for tests is quite cool.
Have a nice day,
mig
the reason seems that shoreman kill(1)s sh -c ...
which forks itself before executing actual command and actual commands does not receive signal and remain running in background. Replacing sh -c ...
with bash -c ...
fixes the issue but I'm not sure that it's correct.
see also:
ddollar/foreman#250
nickstenning/honcho#129
Hello,
Just realized Procfiles with no line break at the end don't work.
Probably because of the way the file is split in order to read lines.
I am working on something else right now but will be able to make a pull request with a patch soon if you want.
Have a nice day,
Mig
Foreman accepts any whitespace after the name. The following Procfile has a tab:
% cat Procfile
asdf: echo 'derp'
% foreman check
valid procfile detected (asdf)
However, shoreman errors:
% ./shoreman
16:14:06 asdf | bash: asdf:: command not found
16:14:06 asdf | 'asdf: echo 'derp'' started with pid 14528
SIGINT received
sending SIGTERM to all processes
We can use [[:space:]]
in extglob to fix:
--- shoreman.orig 2014-08-05 16:14:19.145335921 +0000
+++ shoreman 2014-08-05 16:14:39.546732133 +0000
@@ -78,7 +78,7 @@
PROCFILE=${1:-'Procfile'}
while read line || [ -n "$line" ]; do
name=${line%%:*}
- command=${line#*: }
+ command=${line#*:[[:space:]]}
start_command "$command" "${name}"
echo "'${command}' started with pid ${pid}" | log "${name}"
done < "$PROCFILE"
% ./shoreman
16:14:41 asdf | 'echo 'derp'' started with pid 15218
16:14:41 asdf | derp
SIGINT received
sending SIGTERM to all processes
This cause problem with Windows VirtualBox.
While Guest OS opening a file, the file can't unlink from Host OS (Windows).
Currently, we have to terminate shoreman before switching git branch which modifies the Procfile
.
Foreman close Procfile before starting commands.
When running the tests on travis-ci an error is given, detailed below. Strangely the script still returns a 0
exit status, despite the failure. I've managed to reproduce this on an Ubuntu VM.
$ ./script/cibuild
Shoreman
trap: ERR: bad trap
+ before
+ :
=========================================================
Tests: 0 | Passed: 0 | Failed: 0
Since fb4a143 , Ctrl-C doesn't kill some child processes.
Procfile
sleep1: sleep 1000
sleep2: sleep 1000
$ ./shoreman.sh
08:29:42 sleep1 | 'sleep 1000' started with pid 5865 # <= these are not sleep command pid but may be piped log pid.
08:29:42 sleep2 | 'sleep 1000' started with pid 5873
^CSIGINT received
sending SIGTERM to all processes
SIGINT received
sending SIGTERM to all processes
$ ps ax | grep sleep
5871 pts/1 S 0:00 sleep 1000
5879 pts/1 S 0:00 sleep 1000
5923 pts/1 S+ 0:00 grep sleep
In real situation, I want to stop php-fpm
. 5180c1c works fine.
I'm testing with OSX and CentOS 6.5.
I was thinking we could look into offering a -l, --log
flag to shoreman start -l ./logs
and it could split each process into an append only file. This feature would be disabled by default.
Thoughts?
foo: exit
bar: sleep 10
the sleep keeps running ... this is basic foreman functionality, please add it :)
I have a procfile with a few processes described, yet I only want to run one. I can not accomplish this currently with shoreman. I just wanted to get a feel for what others think about this.
Currently Shoreman traps INT
, TERM
, and EXIT
before sending TERM
to all child processes.
In some cases, having the ability to send individual signals (such as USR1
) to process(es) would allow them time to cleanup before being killed.
I would definitely use this feature, especially in dokku-shoreman and am curious if this is something you would be interested in as well.
I'm seeing output like this:
23:32:15 web.1\t| 'node web.js' started with pid 82555
That \t
should be an actual tab character.
Sometimes the tests fail randomly, I'm not sure why this is, but I expect it's a bug. Need to investigate further to pinpoint the problem, but it doesn't happen on every run.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.