File tree Expand file tree Collapse file tree 7 files changed +56
-7
lines changed Expand file tree Collapse file tree 7 files changed +56
-7
lines changed Original file line number Diff line number Diff line change
1
+ * .yml
2
+ * .yaml
3
+ * .json
4
+ * .md
5
+
6
+ .git *
7
+ bin
8
+ dist
9
+ build
10
+ docs
11
+ examples
12
+ tmp
13
+ vendor
14
+
15
+ .editorconfig
16
+ app.json
17
+ Dockerfile
18
+ CODEOWNERS
19
+ LICENSE
20
+ Makefile
21
+ .env
22
+ docker-compose.yml
23
+ docker-compose.override.yml
24
+ README.md
Original file line number Diff line number Diff line change
1
+ env :
2
+ - GO111MODULE=on
1
3
builds :
2
4
- main : cmd/serve/main.go
3
5
binary : serve
@@ -15,7 +17,6 @@ builds:
15
17
goarch : 386
16
18
env :
17
19
- CGO_ENABLED=0
18
- - GO111MODULE=on
19
20
ldflags :
20
21
- -s -w -X main.version={{.Version}}
21
22
archive :
Original file line number Diff line number Diff line change 20
20
21
21
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
22
22
COPY --from=builder /go/src/github.com/syntaqx/serve/bin/serve /usr/bin/
23
+ COPY --from=builder /go/src/github.com/syntaqx/serve/static /var/www
23
24
24
25
RUN addgroup -S serve \
25
26
&& adduser -D -S -s /sbin/nologin -G serve serve
Original file line number Diff line number Diff line change
1
+ web : serve
Original file line number Diff line number Diff line change 20
20
[ ![ Docker Cloud Build Status] ( https://img.shields.io/docker/cloud/build/syntaqx/serve.svg )] [ docker-hub ]
21
21
[ ![ Docker Pulls] ( https://img.shields.io/docker/pulls/syntaqx/serve.svg )] [ docker-hub ]
22
22
23
+ [ ![ Deploy to Heroku] ( https://www.herokucdn.com/deploy/button.svg )] ( https://dashboard.heroku.com/new?template=https://github.com/syntaqx/serve/tree/master )
24
+
23
25
## TL;DR
24
26
25
27
> It's basically ` python -m SimpleHTTPServer 8080 ` written in Go, because who
@@ -99,14 +101,13 @@ version: '3'
99
101
services :
100
102
web :
101
103
image : syntaqx/serve
102
- build : .
103
104
volumes :
104
105
- ./static:/var/www
105
106
- ./fixtures:/etc/ssl
106
107
environment :
107
- - PORT=8888
108
+ - PORT=1234
108
109
ports :
109
- - 8888
110
+ - 1234
110
111
command : serve -ssl -cert=/etc/ssl/cert.pem -key=/etc/ssl/key.pem -dir=/var/www
111
112
` ` `
112
113
@@ -159,10 +160,14 @@ sure you have the following installed:
159
160
# ## Prerequisites
160
161
161
162
* [Git][git]
162
- * [Go 1.11][golang]+
163
+ * [Go 1.11][golang]+ (with [`GO111MODULE`][modules] enabled)
164
+
165
+ # ## Tooling
166
+
167
+ * [pre-commit](https://pre-commit.com/)
163
168
164
- You will need to activate [Modules][modules] for your version of Go, generally
165
- by invoking `go` with the support `GO111MODULE=on` environment variable set .
169
+ > __Note__: While the tooling isn't explicitly required in order to build and
170
+ > run the project, it's for everyone's benefit that you leverage it .
166
171
167
172
# ## Install
168
173
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " serve" ,
3
+ "description" : " a static http server anywhere you need one" ,
4
+ "repository" : " https://github.com/syntaqx/serve" ,
5
+ "logo" : " https://raw.githubusercontent.com/syntaqx/serve/master/docs/logo.svg?sanitize=true" ,
6
+ "keywords" : [
7
+ " go" ,
8
+ " golang" ,
9
+ " static" ,
10
+ " simple-http-server" ,
11
+ " file-server"
12
+ ],
13
+ "stack" : " container"
14
+ }
Original file line number Diff line number Diff line change
1
+ build :
2
+ docker :
3
+ web : Dockerfile
You can’t perform that action at this time.
0 commit comments