nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.6k stars 146 forks source link

Differences between `foreman export supervisord` and `honcho export supervisord` #109

Closed msabramo closed 9 years ago

msabramo commented 9 years ago

Maybe some of the differences with Foreman are intentional; some are not?

Just going to catalog the differences for now.

[marca@marca-mac2 export_test]$ foreman export supervisord . -a myapp && mv myapp.conf foreman_myapp.conf
[foreman export] writing: myapp.conf
[marca@marca-mac2 export_test]$ honcho export supervisord . -a myapp && mv myapp.conf honcho_myapp.conf
[marca@marca-mac2 export_test]$ diff -u foreman_myapp.conf honcho_myapp.conf
diff --git a/foreman_myapp.conf b/honcho_myapp.conf
index cec5788..1733ae5 100644
--- a/foreman_myapp.conf
+++ b/honcho_myapp.conf
@@ -1,14 +1,13 @@
-
-[program:myapp-ansvc-1]
-command=bin/ansvc start
+[program:myapp-ansvc]
+command=/bin/sh -c 'bin/ansvc start'
 autostart=true
 autorestart=true
 stopsignal=QUIT
-stdout_logfile=/var/log/myapp/ansvc-1.log
-stderr_logfile=/var/log/myapp/ansvc-1.error.log
-user=myapp
+stdout_logfile=/var/log/myapp/ansvc-0.log
+stderr_logfile=/var/log/myapp/ansvc-0.error.log
+user=marca
 directory=/Users/marca/dev/git-repos/honcho/export_test
 environment=PORT="5000"

 [group:myapp]
-programs=myapp-ansvc-1
+programs=myapp-ansvc
msabramo commented 9 years ago

Differences:

  1. Foreman puts a newline at the beginning of the file, like honcho used to do, but this was removed in PR #96. This is a Foreman bug and I've created https://github.com/ddollar/foreman/pull/503 for it. @ddollar just merged this so I'm going to put a line through this one.
  2. Foreman names the program myapp-ansvc-1; Honcho uses myapp-ansvc (no number) and Foreman's numbering (used for program name and log files) starts at 1; Honcho's starts at 0. I've created PR #113 for this.
  3. Honcho sticks a /bin/sh -c in front of the command. Not sure of rationale for this. I've addressed this with PR #110.
  4. Foreman sets the user to the app name. Honcho uses my logged-in user name. I've created PR #111 for this.
  5. Foreman tells the user what it's doing -- e.g.: [foreman export] writing: myapp.conf I've created PR #112 for this.
nickstenning commented 9 years ago

I think we've resolved most of the differences that are worth caring about now. Closing.