Update application name.

This commit is contained in:
Anna Rose 2020-05-20 18:00:35 +00:00
parent 0b8134bbcf
commit 8b28228326
5 changed files with 9 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

View File

@ -1,7 +1,7 @@
FROM alpine:latest as env
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
@ -13,11 +13,11 @@ RUN make build
FROM scratch
ENTRYPOINT ["/srv/smartswitch-server"]
USER smartswitch
ENTRYPOINT ["/srv/gpio-webhook-server"]
USER gpio-webhook
EXPOSE 7200
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

View File

@ -8,4 +8,4 @@ lint:
build:
rm -rf 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

View File

@ -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
microcontrollers running [smartswitch](https://git.annabunch.es/annabunches/smartswitch/).
microcontrollers running [gpio-webhook](https://git.annabunch.es/annabunches/gpio-webhook-arduino/).
## Configuration
@ -30,7 +30,7 @@ make build
And run with:
```
./smartswitch-server
./gpio-webhook-server
```
A dockerfile is also included, along with a sample docker-compose.yml demonstrating