This repository was archived by the owner on Sep 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ This repo is a reworked version of [Sandstorm Hacker Slides](https://github.com/
16
16
- Pdf print
17
17
- [ Demo version] ( https://murmuring-sierra-54081.herokuapp.com )
18
18
- Tiny 10 Mb docker image
19
+ - Optional Basic auth
19
20
20
21
21
22
| Edit mode | Published |
@@ -45,9 +46,23 @@ And then you can just open [http://127.0.0.1:8080](http://127.0.0.1:8080) and it
45
46
Run with docker
46
47
47
48
``` shell
48
- docker run -it -p 8080:8080 -v $( pwd) /slides:/app/slides msoedov/hacker-slides
49
+ docker run -it -p 8080:8080 -v $( pwd) /slides:/app/slides msoedov/hacker-slides
49
50
```
50
51
52
+ Basic auth (disabled by default)
53
+ ``` shell
54
+ USER=bob PASSWORD=password1 go run main.go
55
+ [GIN-debug] [WARNING] Running in " debug" mode. Switch to " release" mode in production.
56
+ - using env: export GIN_MODE=release
57
+ - using code: gin.SetMode(gin.ReleaseMode)
58
+
59
+ WARN[0000] Auth mode enabled
60
+ WARN[0000] Visit http://bob:password1@0.0.0.0:8080
61
+ ```
62
+
63
+ ``` shell
64
+ docker run -it -p 8080:8080 -e USER=bob -e PASSWORD=password1 -v $( pwd) /slides:/app/slides msoedov/hacker-slides
65
+ ```
51
66
52
67
Getting Help
53
68
------------
You can’t perform that action at this time.
0 commit comments