Skip to content

Instantly share code, notes, and snippets.

@Japh
Last active October 10, 2015 11:32
Show Gist options
  • Save Japh/13d9aeba7d449333af90 to your computer and use it in GitHub Desktop.
Save Japh/13d9aeba7d449333af90 to your computer and use it in GitHub Desktop.
Supervisor for Nylas
# Nginx config for proxying requests on port 80 to 5555, put in /etc/nginx/conf.d/
server {
listen 80;
listen 443 default_server ssl;
server_name example.com; # You should change this to the IP address or domain for your server
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:5555;
}
}
[program:api]
command=/usr/local/bin/inbox-api
redirect_stderr=true
stdout_logfile=/var/log/sync-engine-api/access.log
stderr_logfile=/var/log/sync-engine-api/error.log
user=ubuntu
autostart=true
autorestart=true
stopsignal=QUIT
[program:inbox]
command=/usr/local/bin/inbox-start
redirect_stderr=true
stdout_logfile=/var/log/sync-engine/access.log
stderr_logfile=/var/log/sync-engine/error.log
user=ubuntu
autostart=true
autorestart=true
stopsignal=QUIT
@Japh
Copy link
Author

Japh commented Oct 9, 2015

If you're using Supervisor to keep the bin/inbox-start and bin/inbox-api processes running, these are example configs.

Don't forget to manually create the /var/log/sync-engine(-api)/ directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment