Skip to content

Commit 679ddbc

Browse files
committed
Initial commit.
0 parents  commit 679ddbc

26 files changed

+1472
-0
lines changed

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# hidden files
2+
.*
3+
4+
# Vagrant
5+
Vagrantfile
6+
7+
# logs
8+
*.log
9+
10+
# configuration
11+
*.toml
12+
13+
# dependencies
14+
/vendor
15+
16+
# builds
17+
/dist
18+
/build
19+
/docs/public

.goreleaser.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
git:
2+
short_hash: true
3+
4+
project_name: lora-packet-multiplexer
5+
6+
builds:
7+
- main: cmd/lora-packet-multiplexer/main.go
8+
binary: lora-packet-multiplexer
9+
goos:
10+
- windows
11+
- darwin
12+
- linux
13+
goarch:
14+
- amd64
15+
- 386
16+
- arm
17+
- arm64
18+
goarm:
19+
- 5
20+
- 6
21+
- 7
22+
ignore:
23+
- goos: darwin
24+
goarch: 386
25+
26+
release:
27+
disable: true
28+
29+
nfpm:
30+
vendor: LoRa Server project
31+
homepage: https://www.loraserver.io/
32+
maintainer: Orne Brocaar <info@brocaar.com>
33+
description: LoRa Packet Multiplexer
34+
license: MIT
35+
formats:
36+
- deb
37+
bindir: /usr/bin
38+
files:
39+
"packaging/files/lora-packet-multiplexer.rotate": "/etc/logrotate.d/lora-packet-multiplexer"
40+
"packaging/files/lora-packet-multiplexer.init": "/usr/lib/lora-packet-multiplexer/scripts/lora-packet-multiplexer.init"
41+
"packaging/files/lora-packet-multiplexer.service": "/usr/lib/lora-packet-multiplexer/scripts/lora-packet-multiplexer.service"
42+
scripts:
43+
postinstall: "packaging/scripts/post-install.sh"
44+
postremove: "packaging/scripts/post-remove.sh"

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
sudo: required
2+
3+
services:
4+
- docker
5+
6+
script:
7+
- docker-compose run --rm packetmultiplexer make requirements
8+
- docker-compose run --rm packetmultiplexer make test
9+
10+
before_deploy:
11+
- docker-compose run --rm packetmultiplexer make dist
12+
13+
deploy:
14+
- provider: s3
15+
skip_cleanup: true
16+
access_key_id: AKIAJLTNEMD6RLNMP2NQ
17+
secret_access_key:
18+
secure: emdlx1cAKLiiIZz1bVE98OTXorv7aehGylxqeMdpoM1wn05U88jpt42y4bGGZHaT+pC0xg/yvUo3MIaUgIZpLOib+4C5mFBgKiV47zxiHrEk6kUWiJ9hoqFDh5nczQgi097VTjaavyFCxtufJ2oShvRi653I2bR3+WbUX84sAaWIvWcir1ShpZJKkg04mCl7ZdVagLYgodwmZRoDhgbNP7e4XbIYebRcZRa1jYr0oszoCNM0/2v5ER6fRKuQmTXTUz3g5ale62S+bDscHFkR8/iklMYi32/m4/OCicYSIllWbthGnomqZPdtLCobEiI/UScDbFEDb938JnaIB2kU9gv0QuzT3jAYWXGteCZiPppVcq8ZduUHrCF7QPsFplGzQd3vHVn/1v/1+qrtWptJKnLb7QQlK8lNmk3ieHaZhzRYurPbM0SBm2g4mRWj0vf+pDTpcZ8PShKQX1MvRopGfdTmbG3uU6WktbqFuhkLMh112e635TEZpNVmaCaG8eGlC5+OY8l3D/GOqBAher8Ap83QP5whOcHHai8EqsNcDnQpKddCrQqKKYfx5X5NAFWApMe1RqCOyabPm8Sq4Gw7VXfbAKG37x6qUZwy9FHszqXyb+ahtIHWTomhQE2zYayJhikfBqVSVY85ImroE34VrVVWe8Ic4V4vCrn6YE3nrFQ=
19+
bucket: builds.loraserver.io
20+
local-dir: dist/upload
21+
upload-dir: lora-packet-multiplexer
22+
acl: private
23+
region: eu-west-1
24+
on:
25+
tags: true
26+
repo: brocaar/lora-packet-multiplexer

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM golang:1.11-alpine AS development
2+
3+
ENV PROJECT_PATH=/go/src/github.com/brocaar/lora-packet-multiplexer
4+
ENV PATH=$PATH:$PROJECT_PATH/build
5+
ENV CGO_ENABLED=0
6+
ENV GO_EXTRA_BUILD_ARGS="-a -installsuffix cgo"
7+
8+
RUN apk add --no-cache tzdata make git bash
9+
10+
RUN mkdir -p $PROJECT_PATH
11+
COPY . $PROJECT_PATH
12+
WORKDIR $PROJECT_PATH
13+
14+
RUN make dev-requirements requirements
15+
RUN make
16+
17+
FROM alpine:latest AS production
18+
19+
WORKDIR /root/
20+
RUN apk --no-cache add tzdata
21+
COPY --from=development /go/src/github.com/brocaar/lora-packet-multiplexer/build/lora-packet-multiplexer .
22+
ENTRYPOINT ["./lora-packet-multiplexer"]

Dockerfile-devel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM golang:1.11-alpine
2+
3+
ENV PROJECT_PATH=/go/src/github.com/brocaar/lora-packet-multiplexer
4+
ENV PATH=$PATH:$PROJECT_PATH/build
5+
ENV CGO_ENABLED=0
6+
ENV GO_EXTRA_BUILD_ARGS="-a -installsuffix cgo"
7+
8+
RUN apk add --no-cache ca-certificates tzdata make git bash alpine-sdk
9+
10+
RUN mkdir -p $PROJECT_PATH
11+
COPY . $PROJECT_PATH
12+
WORKDIR $PROJECT_PATH
13+
14+
RUN make dev-requirements

Gopkg.lock

Lines changed: 220 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Orne Brocaar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)