Imported Google Group message.
Sender:Martin Buhr
.
Date:Tuesday, 19 May 2015 15:44:34 UTC+1.
Nowadays we’d say use the docker container, it’s more reliable. Golang doesn;t do daemonising very well, so we tend to recommend using supervisord to manage the processes (also makes reu you get all the logs and output in a convenient place.
Check it out, you’ll need a supervisord.conf file that looks lsomething like this (this is a very old one, it will need tweaking, but should get you on the right track):
; Tyk supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:tyk]
command=/usr/bin/tyk --conf=/etc/tyk/tyk.conf
process_name=%(program_name)s
numprocs=1
environment=GOMAXPROCS=
numprocs=1
[program:tyk-dashboard]
command=/home/tyk/tyk-analytics/tyk-analytics --conf=/home/tyk/tyk-analytics/tyk_analytics.conf --license=license.dat
process_name=%(program_name)s
numprocs=1
user=tyk
directory=/home/tyk/tyk-analytics
[program:tyk-host-manager]
command=/home/tyk/tyk-analytics/tyk-host-manager
process_name=%(program_name)s
numprocs=1
user=tyk
directory=/home/tyk/tyk-analytics
Thanks,
Martin
On Tuesday, May 19, 2015 at 3:40:36 PM UTC+1, Jeyhun Jey wrote:
anybody can help me to run tyk dashboard as daemon? thanks? OS Ubuntu!