Make Mastodon services listen on private IP in prod

And allow access to them from the private network
This commit is contained in:
Râu Cao
2022-11-30 11:54:33 +01:00
parent 3df9611a9d
commit c4d43b7f4e
6 changed files with 44 additions and 16 deletions

View File

@@ -6,6 +6,7 @@ Type=simple
User=<%= @user %>
WorkingDirectory=<%= @app_dir %>
Environment="NODE_ENV=production"
Environment="BIND=<%= @bind %>"
Environment="PORT=<%= @port %>"
ExecStart=/usr/bin/npm run start
TimeoutSec=15

View File

@@ -9,7 +9,8 @@ User=<%= @user %>
PIDFile=<%= @app_dir %>/tmp/puma.pid
WorkingDirectory=<%= @app_dir %>
Environment="RAILS_ENV=production"
Environment="PORT=3000"
Environment="BIND=<%= @bind %>"
Environment="PORT=<%= @port %>"
Environment="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
ExecStart=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid
ExecStop=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid stop