Update application name.
This commit is contained in:
parent
0b8134bbcf
commit
8b28228326
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
build/
|
|
@ -1,7 +1,7 @@
|
||||||
FROM alpine:latest as env
|
FROM alpine:latest as env
|
||||||
|
|
||||||
RUN apk --update add ca-certificates
|
RUN apk --update add ca-certificates
|
||||||
RUN addgroup -S smartswitch && adduser -S smartswitch -G smartswitch
|
RUN addgroup -S gpio-webhook && adduser -S gpio-webhook -G gpio-webhook
|
||||||
|
|
||||||
|
|
||||||
FROM golang:1.14 AS build
|
FROM golang:1.14 AS build
|
||||||
|
@ -13,11 +13,11 @@ RUN make build
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
ENTRYPOINT ["/srv/smartswitch-server"]
|
ENTRYPOINT ["/srv/gpio-webhook-server"]
|
||||||
USER smartswitch
|
USER gpio-webhook
|
||||||
EXPOSE 7200
|
EXPOSE 7200
|
||||||
|
|
||||||
COPY --from=env /etc/passwd /etc/group /etc/
|
COPY --from=env /etc/passwd /etc/group /etc/
|
||||||
COPY --from=build --chown=smartswitch /src/build/ /srv/
|
COPY --from=build --chown=gpio-webhook /src/build/ /srv/
|
||||||
COPY --from=env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
COPY --from=env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -8,4 +8,4 @@ lint:
|
||||||
build:
|
build:
|
||||||
rm -rf build/
|
rm -rf build/
|
||||||
mkdir build/
|
mkdir build/
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/smartswitch-server ./cmd/smartswitch-server
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/gpio-webhook-server ./cmd/server
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# A simple webhook server for smartswitch devices
|
# A simple server for controlling GPIO pins on embedded devices
|
||||||
|
|
||||||
This is a tiny webserver designed to receive webhooks that control
|
This is a tiny webserver designed to receive webhooks that control
|
||||||
microcontrollers running [smartswitch](https://git.annabunch.es/annabunches/smartswitch/).
|
microcontrollers running [gpio-webhook](https://git.annabunch.es/annabunches/gpio-webhook-arduino/).
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ make build
|
||||||
And run with:
|
And run with:
|
||||||
|
|
||||||
```
|
```
|
||||||
./smartswitch-server
|
./gpio-webhook-server
|
||||||
```
|
```
|
||||||
|
|
||||||
A dockerfile is also included, along with a sample docker-compose.yml demonstrating
|
A dockerfile is also included, along with a sample docker-compose.yml demonstrating
|
||||||
|
|
Loading…
Reference in New Issue
Block a user