File tree 6 files changed +23
-42
lines changed
6 files changed +23
-42
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
ARG GOLANG_VER=1.12.4-stretch
2
- ARG ALPINE_VER=3.9.3
2
+ ARG ALPINE_VER=3.9.4
3
3
4
4
# # Stage 0: build Go executable from code and templates
5
5
FROM golang:${GOLANG_VER} as builder
@@ -15,8 +15,6 @@ RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
15
15
mkdir -p /go/src/github.com/cig0 && \
16
16
ln -sf /go/src/app /go/src/github.com/cig0/tornote
17
17
18
- VOLUME /go/src/app/
19
-
20
18
RUN make install
21
19
22
20
# # Stage 1: grab compiled binary
@@ -35,10 +33,8 @@ RUN apk add --update sqlite && \
35
33
mkdir /lib64 && \
36
34
ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
37
35
38
- VOLUME /go/src/app/
39
-
40
36
USER limited
41
37
42
38
EXPOSE 8080
43
39
44
- CMD ["tornote" , "-addr" , ":8080" ]
40
+ ENTRYPOINT ["tornote" , "-addr" , ":8080" ]
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ If you have ideas to improve safety/security please open a new issue.
21
21
## Running with Docker
22
22
23
23
``` bash
24
- $ docker build -t tornote-app .
25
- $ docker run -p 80:8080 --name tornote tornote-app
24
+ $ docker build --no-cache - t tornote .
25
+ $ docker run --name tornote - p 80:8080/tcp --memory 10m --memory-reservation 8m --cpus 0.10 tornote
26
26
```
27
27
28
28
## License
Original file line number Diff line number Diff line change 4
4
<!-- Warning -->
5
5
< noscript >
6
6
< div id ="warn " class ="alert alert-danger " role ="alert ">
7
- < strong > Warning!</ strong > You must enable JavaScript because all encryption going inside web browser.
7
+ < strong > Warning!</ strong > You must enable JavaScript since encryption happens inside your web browser.
8
8
</ div >
9
9
</ noscript >
10
10
13
13
< form id ="note " action ="/note " method ="post ">
14
14
< div class ="form-group ">
15
15
< label for ="note ">
16
- Write your note below
17
- < span class ="glyphicon glyphicon-edit small "> </ span > :
16
+ Write your secure note below
17
+ < span class ="glyphicon glyphicon-edit small "> </ span >
18
18
</ label >
19
- < textarea class ="form-control " name ="body " cols ="80 " rows ="4 "> </ textarea >
19
+ < textarea class ="form-control " name ="body " cols ="80 " rows ="16 "> </ textarea >
20
20
< p class ="help-block ">
21
21
Text will be encrypted with
22
22
< a href ="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard "> AES-256</ a >
23
23
< span class ="glyphicon glyphicon-lock small "> </ span >
24
- algorithm and secret ( generated on client-side) .
24
+ algorithm and a secret generated on your browser .
25
25
</ p >
26
26
</ div >
27
27
< div class ="form-group text-center ">
36
36
<!-- Secret link -->
37
37
< div id ="done " class ="hidden ">
38
38
< div class ="form-group ">
39
- < label for ="secret_link "> Your secret message available on the link :</ label >
39
+ < label for ="secret_link "> Your secret message is available at :</ label >
40
40
< pre id ="secret_link "> </ pre >
41
41
</ div >
42
42
< div class ="form-group text-center ">
Original file line number Diff line number Diff line change 5
5
< meta charset ="utf-8 ">
6
6
< meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7
7
< meta name ="viewport " content ="width=device-width, initial-scale=1 ">
8
- < meta name ="description " content ="Anonymous self-destructing notes written in Go. ">
8
+ < meta name ="description " content ="Anonymous self-destructing notes ">
9
9
< meta name ="author " content ="">
10
10
11
11
< title > Tornote - {{ template "title" . }}</ title >
12
12
13
- < link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6 /css/bootstrap.min.css "
14
- integrity ="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7 "
13
+ < link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7 /css/bootstrap.min.css "
14
+ integrity ="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u "
15
15
crossorigin ="anonymous ">
16
16
< link rel ="stylesheet " href ="/public/styles.css ">
17
17
18
- < script src ="//ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js "> </ script >
18
+ < script src ="https: //ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js "> </ script >
19
19
</ head >
20
20
< body >
21
21
Original file line number Diff line number Diff line change 1
- {{ define "title" }}Anonymous Self -destructing Notes {{ end }}
1
+ {{ define "title" }}Anonymous self -destructing notes {{ end }}
2
2
3
3
{{ define "content" }}
4
4
< div class ="form-group ">
5
- < label for ="secret_note ">
6
- This note permanently deleted after reading
7
- < span class ="glyphicon glyphicon-fire "> </ span > :
8
- </ label >
5
+ < label for ="secret_note "> Here is your secret message:</ label >
9
6
< pre id ="secret_note " class ="hidden "> {{.}}</ pre >
7
+ < p align ='center '> The note on the server has already been destroyed
8
+ < span class ="glyphicon glyphicon-fire "> </ span >
9
+ </ p >
10
+ < p align ='center '>
11
+ < em > You won't be able to access this data anymore!</ em >
12
+ </ p >
10
13
</ div >
11
14
< div class ="form-group text-center ">
12
15
< a href ="/ " class ="btn btn-lg btn-success ">
13
16
< span class ="glyphicon glyphicon-record small "> </ span >
14
17
Create another note
15
18
</ a >
16
19
</ div >
17
- {{ end }}
20
+ {{ end }}
You can’t perform that action at this time.
0 commit comments