loginsrv

Unnamed repository; edit this file 'description' to name the repository.
git clone git@jamesshield.xyz:repos/loginsrv.git
Log | Files | Refs | README | LICENSE

commit 6adcd856fba8c3d55482f344a5da1e8d105124ed
parent 7f32228c029463e01016ace27f7e5454f6c443ca
Author: domano <angor.mail+github@googlemail.com>
Date:   Wed, 31 May 2017 13:28:12 +0200

Merge pull request #28 from tarent/feature/nonroot-docker-user-and-port-8080

Feature/nonroot docker user and port 8080
Diffstat:
MDockerfile | 6++++--
MREADME.md | 6+++---
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -1,5 +1,7 @@ FROM alpine -ENV LOGINSRV_HOST=0.0.0.0 LOGINSRV_PORT=80 +RUN addgroup -S loginsrv && adduser -S -g loginsrv loginsrv +USER loginsrv +ENV LOGINSRV_HOST=0.0.0.0 LOGINSRV_PORT=8080 COPY loginsrv / ENTRYPOINT ["/loginsrv"] -EXPOSE 80 +EXPOSE 8080 diff --git a/README.md b/README.md @@ -72,15 +72,15 @@ So e.g. `jwt-secret` can be set by environment variable `LOGINSRV_JWT_SECRET`. The simplest way to use loginsrv is by the provided docker container. E.g. configured with the simple provider: ``` -$ docker run -d -p 80:80 tarent/loginsrv -jwt-secret my_secret -simple bob=secret +$ docker run -d -p 8080:8080 tarent/loginsrv -jwt-secret my_secret -simple bob=secret -$ curl --data "username=bob&password=secret" 127.0.0.1/login +$ curl --data "username=bob&password=secret" 127.0.0.1:8080/login eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJib2IifQ.uWoJkSXTLA_RvfLKe12pb4CyxQNxe5_Ovw-N5wfQwkzXz2enbhA9JZf8MmTp9n-TTDcWdY3Fd1SA72_M20G9lQ ``` The same configuration could be written with environment variables this way: ``` -$ docker run -d -p 80:80 -e LOGINSRV_JWT_SECRET=my_secret -e LOGINSRV_BACKEND=provider=simple,bob=secret tarent/loginsrv +$ docker run -d -p 8080:8080 -e LOGINSRV_JWT_SECRET=my_secret -e LOGINSRV_BACKEND=provider=simple,bob=secret tarent/loginsrv ``` ## API