mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
Merge remote-tracking branch 'origin' into develop
This commit is contained in:
commit
57a1532db4
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
FROM golang:alpine AS build-env
|
||||||
|
|
||||||
|
# Set up dependencies
|
||||||
|
# bash for debugging
|
||||||
|
# git, make for installation
|
||||||
|
# libc-dev, gcc, linux-headers, eudev-dev are used for cgo and ledger installation (possibly)
|
||||||
|
RUN apk add bash git make libc-dev gcc linux-headers eudev-dev jq
|
||||||
|
|
||||||
|
|
||||||
|
# Set working directory for the build
|
||||||
|
WORKDIR /root/kava
|
||||||
|
# default home directory is /root
|
||||||
|
|
||||||
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
# Add source files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install kvd, kvcli
|
||||||
|
#ENV LEDGER_ENABLED False
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
# Run kvd by default, omit entrypoint to ease using container with kvcli
|
||||||
|
CMD ["kvd"]
|
6
contrib/init/README.md
Normal file
6
contrib/init/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Sample configuration files for:
|
||||||
|
|
||||||
|
```
|
||||||
|
SystemD: kvd.service
|
||||||
|
macOS: io.kava.kvd.plist
|
||||||
|
```
|
20
contrib/init/io.kava.kvd.plist
Normal file
20
contrib/init/io.kava.kvd.plist
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>io.kava.kvd</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<!--Assumes user is "kava"-->
|
||||||
|
<string>/Users/kava/go/bin/kvd</string>
|
||||||
|
<string>start</string>
|
||||||
|
</array>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
<key>UserName</key>
|
||||||
|
<string>kava</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
||||||
|
QuantaFrontier.com
|
15
contrib/init/kvd.service
Normal file
15
contrib/init/kvd.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Kava daemon
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
|
||||||
|
# Run as kava:kava
|
||||||
|
User=kava
|
||||||
|
ExecStart=/home/kava/go/bin/kvd start
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=3
|
||||||
|
LimitNOFILE=4096
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user