[Prod] Load unicorn config through env variables

This commit is contained in:
Earlopain 2023-04-04 12:04:17 +02:00
parent 1d835871d6
commit ecb4242f23
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897

View File

@ -2,14 +2,13 @@
app_path = "/home/e621/e621ng"
# Set unicorn options
worker_processes 15
worker_processes ENV.fetch("UNICORN_WORKER_COUNT").to_i
timeout 180
#listen "127.0.0.1:9000", :tcp_nopush => true
listen "#{app_path}/tmp/.unicorn.sock", :backlog => 512
listen ENV.fetch("UNICORN_LISTEN_ADDRESS"), tcp_nopush: true, backlog: 2048
# Spawn unicorn master worker for user apps (group: apps)
user 'e621', 'e621'
user "e621", "e621"
# Fill path to your app
working_directory app_path