Last active
June 4, 2019 06:02
-
-
Save mpilar/051ea8830cc70e6315ba to your computer and use it in GitHub Desktop.
supervisord conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STORAGE = 'thumbor.storages.redis_storage' | |
# ALLOW_UNSAFE_URL = True | |
AUTO_WEBP = True | |
DETECTORS = [ 'thumbor.detectors.face_detector', 'thumbor.detectors.feature_detector' ] | |
OPTIMIZERS = ['thumbor.optimizers.jpegtran', 'thumbor.optimizers.gifv'] | |
MAX_AGE = 30 * 24 * 60 * 60 | |
FFMPEG_PATH = '/usr/bin/avconv' | |
## Insert private stuff next: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STORAGE = 'thumbor.storages.redis_storage' | |
ALLOW_UNSAFE_URL = True | |
AUTO_WEBP = True | |
DETECTORS = [ 'thumbor.detectors.face_detector', 'thumbor.detectors.feature_detector' ] | |
OPTIMIZERS = ['thumbor.optimizers.jpegtran', 'thumbor.optimizers.gifv'] | |
FFMPEG_PATH = '/usr/bin/avconv' | |
MAX_AGE = 60 | |
## Insert private stuff next: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A virtual host using mix of IP-, name-, and port-based configuration | |
# | |
upstream thumbor { | |
server 127.0.0.1:8000; | |
server 127.0.0.1:8001; | |
server 127.0.0.1:8002; | |
server 127.0.0.1:8003; | |
} | |
server { | |
listen 80; | |
server_name DOMAIN_NAME; | |
client_max_body_size 10M; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header HOST $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://thumbor; | |
proxy_redirect off; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Sample supervisor config file. | |
; | |
; For more information on the config file, please see: | |
; http://supervisord.org/configuration.html | |
; | |
; Notes: | |
; - Shell expansion ("~" or "$HOME") is not supported. Environment | |
; variables can be expanded using this syntax: "%(ENV_HOME)s". | |
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment". | |
[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) | |
;umask=022 ; (process file creation umask;default 022) | |
;user=chrism ; (default is current user, required if root) | |
;identifier=supervisor ; (supervisord identifier, default is 'supervisor') | |
;directory=/tmp ; (default is not to cd during start) | |
;nocleanup=true ; (don't clean up tempfiles at start;default false) | |
;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) | |
;environment=KEY="value" ; (key value pairs to add to environment) | |
;strip_ansi=false ; (strip ansi escape codes in logs; def. false) | |
; the below 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: sections | |
[rpcinterface:supervisor] | |
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | |
[supervisorctl] | |
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket | |
; The [include] section can just contain the "files" setting. This | |
; setting can list multiple files (separated by whitespace or | |
; newlines). It can also contain wildcards. The filenames are | |
; interpreted as relative to this file. Included files *cannot* | |
; include files themselves. | |
[include] | |
files = /etc/supervisor/conf.d/*.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:thumbor] | |
; The following command uses a different thumbor config file for each | |
; processes, however we want the same setup for each so that isn't necessary | |
; command=thumbor --ip=127.0.0.1 --port=800%(process_num)s --conf=/etc/thumbor800%(process_num)s.conf | |
; Instead we'll use this command to use just the one conf file | |
command=thumbor --ip=127.0.0.1 --port=800%(process_num)s --conf=/etc/thumbor.conf | |
process_name=thumbor800%(process_num)s | |
numprocs=4 | |
autostart=true | |
autorestart=true | |
startretries=3 | |
stopsignal=TERM | |
; Output logs for each of our processes | |
stdout_logfile=/var/log/thumbor/thumbor800%(process_num)s.stdout.log | |
stdout_logfile_maxbytes=1MB | |
stdout_logfile_backups=10 | |
stderr_logfile=/var/log/thumbor/thumbor800%(process_num)s.stderr.log | |
stderr_logfile_maxbytes=1MB | |
stderr_logfile_backups=10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment