Skip to content

Commit

Permalink
Add boxfile and example config
Browse files Browse the repository at this point in the history
  • Loading branch information
glinton committed May 18, 2017
1 parent 1f8d2b6 commit 6b6c11e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ build
logvac
logvac.json
*.cover*
db
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ curl -k "https://127.0.0.1:6360?type=log&auth=TOKEN"
```

#### Gotchas
- If you're seeing the following error, run logvac with admin or sudo privileges:
`FATAL Authenticator failed to initialize - open /var/db/log-auth.bolt: permission denied`
- If you're seeing any of the following errors, run logvac with admin or sudo privileges (or adjust your configuration):
- `FATAL Authenticator failed to initialize - open /var/db/log-auth.bolt: permission denied`
- `Collector failed to initialize - listen udp 127.0.0.1:514: bind: permission denied`

- If logvac doesn't seem to be doing anything (adding/fecthing logs), there is a chance you've started the server with authentication (the default) but have forgotten to add a token:
`logvac add-token -t TOKEN`
Expand Down
33 changes: 33 additions & 0 deletions boxfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This boxfile is for use with nanobox.io's `nanbox` cli. Simply
# run `nanobox run` to test/develop, or run `nanobox deploy dry-run`
# to utilize. (Note the port mapping that will occur in dry-run)

run.config:
engine: 'golang'
engine.config:
package: 'github.com/nanopack/logvac'
extra_steps:
- go get github.com/nanopack/mist
- go build -o logvac

deploy.config:
extra_steps:
- go get github.com/nanopack/mist
- cp $(which mist) $APP_DIR/mist
- cp $CODE_DIR/config.json $APP_DIR/config.json

data.storage:
image: nanobox/unfs

web.logvac:
network_dirs:
data.storage:
- db/
ports:
- tcp:8080:1445 # for mist (subscribe to logs)
- tcp:6360:6360 # for adding users or posting logs via http
- tcp:6361:6361 # for submitting logs via tcp
- udp:514:6361 # for submitting logs via udp
start:
mist: './mist --server --listeners "tcp://0.0.0.0:1445"'
logvac: './logvac -c config.json'
15 changes: 15 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"listen-http": "0.0.0.0:6360",
"listen-udp": "0.0.0.0:6361",
"listen-tcp": "0.0.0.0:6361",
"pub-address": "mist://localhost:1445",
"pub-auth": "secret",
"db-address": "boltdb:///app/db/db.bolt",
"auth-address": "boltdb:///app/db/log-auth.bolt",
"log-keep": "{\"app\":\"5m\"}",
"log-type": "app",
"log-level": "debug",
"token": "secret",
"server": true,
"insecure": true
}

0 comments on commit 6b6c11e

Please sign in to comment.