capistrano-systemd-ng 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d2465b8af1c66f78bb36e1b385b74eb6dc1c083148c1925c8fceec6a036ddb4
4
- data.tar.gz: 9595a31afc13f291f32aafaabc604e52aa0ddcd0f1a6087d4370d799f59602ad
3
+ metadata.gz: a50ddb67a418be03b5d2920ae7f6ae33de0599517ad6d7120ddcd4918a4a325b
4
+ data.tar.gz: a8974fa62acd4a059346cc4a7ecea4eeddae91e5b753504b05ed6500a6fd067c
5
5
  SHA512:
6
- metadata.gz: 58dee30948ac5ea137e01f67435104342b56dfb843f3c05bf21bca7022595a01e7c698bbd5bc8dbdc67ce613bf3fdbe64e797ee2b7059d5524b16924ecda5b6d
7
- data.tar.gz: 0d6f526890d527b3e23990954c6018951839177e20b7d95d1dd82d04bd7736e16693d91e5d5b02f5fa03d97bdf296672ac8d35f508e6c8694a5f1155b7dba884
6
+ metadata.gz: 9002a9eeebb5ffa552d66f3339ca2121ab825455545bdf861bf9653d0d8691f0243ded4c8273f06c893d4d06068bc21b1ba80930ee8042a8f179e06d79398318
7
+ data.tar.gz: 561b0469b18e7b0d5d2578827ae746ac41298464381889a84e70edd7ca7a128cdc6cc5031fd7cb59e8b375ba7cb106c2d3f681d23014fec62543b086bdb6d4a6
data/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2016 YAMADA Tsuyoshi
3
+ Copyright (c) 2023 Gaspard d'Hautefeuille, Danil Pismenny
4
+ Copyright (c) 2016-2022 YAMADA Tsuyoshi
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # capistrano-systemd-ng
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/capistrano-systemd-ng.png)](https://rubygems.org/gems/capistrano-systemd-ng) [![CI](https://github.com/HLFH/capistrano-systemd-ng/actions/workflows/ci.yml/badge.svg)](https://github.com/HLFH/capistrano-systemd-ng/actions/workflows/ci.yml)
3
+ [![Gem Version](https://badge.fury.io/rb/capistrano-systemd-ng.svg)](https://rubygems.org/gems/capistrano-systemd-ng) [![CI](https://github.com/HLFH/capistrano-systemd-ng/actions/workflows/ci.yml/badge.svg)](https://github.com/HLFH/capistrano-systemd-ng/actions/workflows/ci.yml)
4
4
 
5
5
  This gem adds capistrano tasks to control multiple services with systemd.
6
6
  This gem supports capistrano > 3.17.0.
@@ -83,6 +83,40 @@ If using the user service type services will be installed in your users home dir
83
83
  Systemd commands on those services can be run by passing a `--user` flag, e.g. ```systemctl --user list-unit-files```
84
84
  Nothing else in setup should require change and Capistrano tasks should remain the same as when installing system services.
85
85
 
86
+ Example of user service in `config/systemd/passenger.service.erb`:
87
+ ```
88
+ [Unit]
89
+ Description=Passenger Standalone Application Server for <%= fetch(:application) %>
90
+ After=network.target
91
+
92
+ [Service]
93
+ Type=forking
94
+ Environment=RAILS_ENV=<%= fetch(:rails_env) %>
95
+ Environment=PWD=<%= current_path %>
96
+ WorkingDirectory=<%= current_path %>
97
+ PIDFile=/run/passenger/devopsy.pid
98
+ ExecStart=/home/deploy/.asdf/bin/asdf exec bundle exec passenger start -d --pid-file /run/passenger/devopsy.pid -e production -p 3002 --instance-registry-dir /run/passenger
99
+ ExecStop=/home/deploy/.asdf/bin/asdf exec bundle exec passenger stop --pid-file /run/passenger/devopsy.pid
100
+ PrivateTmp=yes
101
+
102
+ [Install]
103
+ WantedBy=default.target
104
+ ```
105
+ For user services, the target should be `default.target`, not `multi-user.target`.
106
+ And no `User` or `Group` should be mentioned to avoid errors.
107
+
108
+ It is in `config/deploy.rb` that you should have the user set, and for that example:
109
+ ```
110
+ set :user, "deploy"
111
+ after 'deploy:publishing', 'systemd:passenger:restart'
112
+ ```
113
+
114
+ And in the `Capfile`, you should have these:
115
+ ```
116
+ require "capistrano/systemd/multiservice"
117
+ install_plugin Capistrano::Systemd::MultiService.new_service("passenger", service_type: "user")
118
+ ```
119
+
86
120
  ## Capistrano Tasks
87
121
 
88
122
  With `install_plugin Capistrano::Systemd::MultiService.new_service("example1")`,
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Systemd
3
3
  module MultiService
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-systemd-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaspard d'Hautefeuille
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-06-22 00:00:00.000000000 Z
12
+ date: 2023-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano