Config deploy for production
This commit is contained in:
parent
392f580648
commit
af6893b679
1
Capfile
1
Capfile
@ -5,6 +5,7 @@ require 'capistrano/setup'
|
|||||||
require 'capistrano/deploy'
|
require 'capistrano/deploy'
|
||||||
|
|
||||||
require 'capistrano/puma'
|
require 'capistrano/puma'
|
||||||
|
install_plugin Capistrano::Puma # Default puma tasks
|
||||||
require 'capistrano/puma/workers'
|
require 'capistrano/puma/workers'
|
||||||
require 'capistrano/puma/jungle'
|
require 'capistrano/puma/jungle'
|
||||||
require 'capistrano/rbenv'
|
require 'capistrano/rbenv'
|
||||||
|
|||||||
@ -27,7 +27,8 @@ set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/sys
|
|||||||
|
|
||||||
set :rbenv_type, :user # or :system, depends on your rbenv setup
|
set :rbenv_type, :user # or :system, depends on your rbenv setup
|
||||||
set :rbenv_ruby, '2.6.0'
|
set :rbenv_ruby, '2.6.0'
|
||||||
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
|
set :rbenv_custom_path, "/home/jesse/.rbenv/"
|
||||||
|
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_custom_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_custom_path)}/bin/rbenv exec"
|
||||||
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
|
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
|
||||||
set :rbenv_roles, :all # default value
|
set :rbenv_roles, :all # default value
|
||||||
|
|
||||||
|
|||||||
50
config/nginx/13.owlephant.icu.conf
Normal file
50
config/nginx/13.owlephant.icu.conf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
upstream thirteen_production {
|
||||||
|
server unix:///home/jesse/srv/thirteen-tien-len_production/shared/tmp/sockets/puma.sock fail_timeout=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name 13dev.owlwphant.icu;
|
||||||
|
root /home/jesse/web/thirteen-tien-len/public;
|
||||||
|
access_log /home/jesse/web/thirteen-tien-len/log/nginx.log;
|
||||||
|
|
||||||
|
try_files $uri @app;
|
||||||
|
|
||||||
|
location @app {
|
||||||
|
proxy_pass http://13dev;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_next_upstream error timeout invalid_header http_502;
|
||||||
|
|
||||||
|
proxy_connect_timeout 600;
|
||||||
|
proxy_send_timeout 600;
|
||||||
|
proxy_read_timeout 600;
|
||||||
|
send_timeout 600;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# listen 443 ssl; # managed by Certbot
|
||||||
|
# ssl_certificate /etc/letsencrypt/live/13dev.quaff.top/fullchain.pem; # managed by Certbot
|
||||||
|
# ssl_certificate_key /etc/letsencrypt/live/13dev.quaff.top/privkey.pem; # managed by Certbot
|
||||||
|
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
|
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
server {
|
||||||
|
if ($host = 13dev.quaff.top) {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
} # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
server_name 13dev.quaff.top;
|
||||||
|
listen 80;
|
||||||
|
return 404; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user