Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: add systemd service files #265

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Service configuration files

- `miden-faucet.service`: simple configuration to setup a faucet service monitored via systemd.
- `miden-node.service`: simple configuration to setup full node service monitored via systemd.

Install the above files to your system's unit directory (e.g.
`/etc/systemd/system/`), and run the following commands to start the service:

```sh
systemctl daemon-reload # ask the systemd to load the new configuration files
systemctl enable --now miden-node # enable and start the node
systemctl enable --now miden-faucet # enable and start the faucet
```
16 changes: 16 additions & 0 deletions config/miden-faucet.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Miden faucet
Wants=network-online.target
Wants=miden-node.service

[Install]
WantedBy=multi-user.target

[Service]
Type=exec
Environment="RUST_LOG=info"
ExecStart=miden-faucet import --asset-amount 100 --faucet-path /srv/miden-node/accounts/account1.mac
ExecStartPre=-rm store.sqlite3
WorkingDirectory=/srv/miden-faucet
RestartSec=5
Restart=always
14 changes: 14 additions & 0 deletions config/miden-node.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Miden node
Wants=network-online.target

[Install]
WantedBy=multi-user.target

[Service]
Type=exec
Environment="RUST_LOG=info"
ExecStart=miden-node start
WorkingDirectory=/srv/miden-node
RestartSec=5
Restart=always
Loading