-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dmsg daemon completed #23
base: main
Are you sure you want to change the base?
Changes from all commits
731440c
ef1355d
debce98
525eca8
0d5c9f4
8c10b2d
62125b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,4 @@ | |
|
||
.idea | ||
|
||
.uuid | ||
uuid.txt | ||
dmsg_container |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM golang:1.16.3-alpine AS build | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
WORKDIR /src | ||
|
||
# Copy Go code to the container | ||
COPY . . | ||
# Download deps usings go mod | ||
RUN go mod download | ||
|
||
# dmsg daemon | ||
RUN go build -o /out/dmsgd ./dmsg | ||
|
||
FROM ubuntu:20.10 | ||
|
||
# Copy compiled dmsg daemon | ||
COPY --from=build /out/dmsgd /bin/dmsgd | ||
|
||
# Making dmsgd to be an entrypoint | ||
ENTRYPOINT ["/bin/dmsgd", "--log-dir=/dmsgd-data"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# skycoin-services | ||
|
||
skycon-services | ||
|
||
## dmsg daemon | ||
|
||
This daemon will create `.dmsg-uuid` file, which contains your unique UUID. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would help if you could summarise the purpose of this utility in 2-3 sentences as well. |
||
It also log all the actions and results to the `dmsg-uuid.log` file. | ||
These files will be created in the same directory, where **dmsgd** are running. | ||
|
||
- **port** - to start HTTP server on | ||
- **disc** - dmsg discovery server | ||
- **sk** - dmsg server secret key | ||
- **log-dir** - directory to store logs and UUID data | ||
|
||
### Building from source | ||
|
||
1. `go build -o dmsgd ./dmsg` | ||
2. `./dmsgd` | ||
|
||
### Running in Docker | ||
|
||
1. `docker build -t dmsgd . && docker run -d -v /$PWD/docker_container:/dmsgd-data dmsgd --port=80 --disc="http://dmsg.discovery.skywire.skycoin.com" --sk=***` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Configuring the container with command flag/arguments gets a bit annoying. It may be preferable to mount a config similar to skycoin/skywire#794 I also can build the docker container and it seems to run but does not return any logs. Not sure if that is intended or if that indicates the container not working. Running Most people also need some instruction they can copy paste, so I would suggest picking a port other than :80 as it is commonly used by other applications already. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
### Go template | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
system-survey |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.PHONY: build | ||
.DEFAULT_GOAL := build | ||
|
||
build: | ||
go build -o system-survey |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it was part of the requirements you got, but putting logs and config/ID values in the same file may be less than optimal. Unless this was requested specifically.