Skip to content

Commit 13cb143

Browse files
committed
add function start/stop puma for mina
1 parent cd8a94e commit 13cb143

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

config/deploy.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
invoke :'my_db_migrate'
8383
invoke :'my_assets_clean'
8484
invoke :'deploy:cleanup'
85+
invoke :'my_start_puma'
8586

8687
on :launch do
8788
in_path(fetch(:current_path)) do
@@ -125,8 +126,17 @@
125126

126127
task :my_start_puma do
127128
in_path(fetch(:current_path)) do
128-
comment %{Starting puma...}
129-
command %{}
129+
comment %{Puma is starting...}
130+
command %{bundler exec puma -C config/puma.rb -e production -d}
131+
comment %{Puma started!}
132+
end
133+
end
134+
135+
task :my_stop_puma do
136+
in_path(fetch(:current_path)) do
137+
comment %{Puma is stopping...}
138+
command %{kill -9 `cat tmp/pids/puma.pid`}
139+
comment %{Puma stopped!}
130140
end
131141
end
132142
# For help in making your deploy script, see the Mina documentation:

0 commit comments

Comments
 (0)