Skip to content

Commit

Permalink
added files
Browse files Browse the repository at this point in the history
  • Loading branch information
KenWilliamson committed Mar 15, 2020
1 parent cfca962 commit f84992f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu

#RUN sudo apt-get update
RUN apt-get update
RUN apt-get install -y ca-certificates
ADD main /main
ADD entrypoint.sh /entrypoint.sh
ADD static /static
WORKDIR /

EXPOSE 8091
ENTRYPOINT ["/entrypoint.sh"]

5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

./main


Binary file modified main
Binary file not shown.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func main() {

var oh hand.OauthHandler
var logger lg.Logger
logger.LogLevel = lg.AllLevel
logger.LogLevel = lg.OffLevel
oh.Log = &logger
var cc hand.ClientCreds
oh.ClientCreds = &cc
Expand Down Expand Up @@ -143,6 +143,8 @@ func main() {
router.HandleFunc("/login", h.HandleLogin)
router.HandleFunc("/logout", h.HandleLogout)

router.HandleFunc("/rs/loglevel", h.SetLogLevel).Methods("POST")

// admin resources
router.PathPrefix("/").Handler(http.FileServer(http.Dir("./static/")))
//http.Handle("/js", fs)
Expand Down

0 comments on commit f84992f

Please sign in to comment.