- Create user
docstore-bureaucracywithuseradd - Download with wget latest version of ethdocstore (as tgz) into
/home/docstore-bureaucracyand unpack. Symlinkethdocstoreto that version, in/home/docstore-bureaucracy - Define an
ethdocstore-datadirectory - Edit the
application.conffile in the conf directory of the distribution (perhaps as a symlink elsewhere to prevent upgrades from overwriting, currently the true file is/home/docstore-bureaucracy/conf/application.conf) - Install the
ethdocstore.servicefile (also in this gist) in /usr/lib/systemd/system/ (make sure the version / path-to-bin are correct) - Make a symlink from
/etc/systemd/system/multi-user.target.wants/ethdocstore.serviceto/usr/lib/systemd/system/ethdocstore.service systemctl enable ethdocstorefollowed bysystemctl start ethdocstore- Verify that logging goes to the systemd journal with
journalctl --follow -u ethdocstore
Last active
April 27, 2021 03:12
-
-
Save swaldman/9c08d395e376dd1cdee759a12156d2c5 to your computer and use it in GitHub Desktop.
Setting up ethdocstore as a service under systemd Fedora 27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This gist describes ethdocstore setup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ethdocstore { | |
| contracts { | |
| 0xcbc2e5f5fbc14ea4951f87c4029cf536cd66f784 { | |
| postPutHook = "GitAddCommitPush" | |
| } | |
| } | |
| node { | |
| url = "https://ethjsonrpc.mchange.com" | |
| chainId = 1 | |
| } | |
| http { | |
| server { | |
| interface = "127.0.0.1" | |
| # path = "/poop/" # commented out, our base URL is at document root of the server | |
| port = 7237 | |
| dataDir = "/home/docstore-bureaucracy/ethdocstore-data" | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=ethdocstore service | |
| After=syslog.target network.target | |
| [Service] | |
| User=docstore-bureaucracy | |
| Group=docstore-bureaucracy | |
| Environment=HOME=/home/docstore-bureaucracy | |
| Type=simple | |
| ExecStart=/home/docstore-bureaucracy/ethdocstore/bin/ethdocstore | |
| KillMode=process | |
| KillSignal=SIGINT | |
| TimeoutStopSec=90 | |
| Restart=on-failure | |
| RestartSec=10s | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment