Skip to content

Commit

Permalink
Add Nix IDX Linux platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed Oct 10, 2024
1 parent 2f242ac commit 8980d03
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
start-mongodb = "/usr/bin/mongod -f ~/json-scada/platform-nix-idx/mongod.conf";
start-supervisor = "(supervisord -c ~/json-scada/platform-nix-idx/supervisord.conf &)";
};
};
};
Expand Down
53 changes: 53 additions & 0 deletions platform-nix-idx/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;

[inet_http_server] ; inet (TCP) server disabled by default
port=127.0.0.1:9000 ; ip_address:port specifier, *:port for all iface
username= ; default is no username (open server)
password= ; default is no password (open server)

[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 ; # of main logfile backups; 0 means none, 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
silent=false ; no logs to stdout if true; default false
minfds=1024 ; min. avail startup file descriptors; default 1024
minprocs=200 ; min. avail process descriptors;default 200

; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

; The supervisorctl section configures how supervisorctl will connect to
; supervisord. configure it match the settings in either the unix_http_server
; or inet_http_server section.

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=user ; should be same as in [*_http_server] if set
;password=123 ; should be same as in [*_http_server] if set
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history ; use readline history if available

[program:cs_data_processor]
; args: instance# loglevel
command=/usr/bin/node /home/user/json-scada/src/cs_data_processor/cs_data_processor.js 1 1
autostart=true
numprocs=1 ; number of processes copies to start (def 1)
directory=/home/user/json-scada/src/cs_data_processor/ ; directory to cwd to before exec (def no cwd)
user=jsonscada ; setuid to this UNIX account to run the program
redirect_stderr=true ; redirect proc stderr to stdout (default false)
stdout_logfile=/home/user/json-scada/log/cs_data_processor.log ; stdout log path, NONE for none; default AUTO
stdout_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
stdout_capture_maxbytes=10MB ; number of bytes in 'capturemode' (default 0)

0 comments on commit 8980d03

Please sign in to comment.