Skip to content

Commit f84992f

Browse files
committed
added files
1 parent cfca962 commit f84992f

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu
2+
3+
#RUN sudo apt-get update
4+
RUN apt-get update
5+
RUN apt-get install -y ca-certificates
6+
ADD main /main
7+
ADD entrypoint.sh /entrypoint.sh
8+
ADD static /static
9+
WORKDIR /
10+
11+
EXPOSE 8091
12+
ENTRYPOINT ["/entrypoint.sh"]
13+

entrypoint.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
./main
4+
5+

main

4.08 KB
Binary file not shown.

main.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func main() {
6464

6565
var oh hand.OauthHandler
6666
var logger lg.Logger
67-
logger.LogLevel = lg.AllLevel
67+
logger.LogLevel = lg.OffLevel
6868
oh.Log = &logger
6969
var cc hand.ClientCreds
7070
oh.ClientCreds = &cc
@@ -143,6 +143,8 @@ func main() {
143143
router.HandleFunc("/login", h.HandleLogin)
144144
router.HandleFunc("/logout", h.HandleLogout)
145145

146+
router.HandleFunc("/rs/loglevel", h.SetLogLevel).Methods("POST")
147+
146148
// admin resources
147149
router.PathPrefix("/").Handler(http.FileServer(http.Dir("./static/")))
148150
//http.Handle("/js", fs)

0 commit comments

Comments
 (0)