mirror of https://github.com/statping/statping
first
parent
26b8ab85a5
commit
a5c43f6957
|
@ -1,2 +1,3 @@
|
||||||
.idea
|
.idea
|
||||||
rice-box.go
|
rice-box.go
|
||||||
|
config.yml
|
15
.travis.yml
15
.travis.yml
|
@ -29,12 +29,12 @@ deploy:
|
||||||
- provider: releases
|
- provider: releases
|
||||||
api_key: $GH_TOKEN
|
api_key: $GH_TOKEN
|
||||||
file:
|
file:
|
||||||
- "build/fusioner-osx-x64"
|
- "build/statup-osx-x64"
|
||||||
- "build/fusioner-osx-x32"
|
- "build/statup-osx-x32"
|
||||||
- "build/fusioner-linux-x64"
|
- "build/statup-linux-x64"
|
||||||
- "build/fusioner-linux-x32"
|
- "build/statup-linux-x32"
|
||||||
- "build/fusioner-windows-x64.exe"
|
- "build/statup-windows-x64.exe"
|
||||||
- "build/fusioner-windows-x32.exe"
|
- "build/statup-windows-x32.exe"
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -53,8 +53,7 @@ before_script:
|
||||||
- go get github.com/karalabe/xgo
|
- go get github.com/karalabe/xgo
|
||||||
- go get github.com/GeertJohan/go.rice
|
- go get github.com/GeertJohan/go.rice
|
||||||
- go get github.com/GeertJohan/go.rice/rice
|
- go get github.com/GeertJohan/go.rice/rice
|
||||||
- go get -u golang.org/x/vgo
|
- go get
|
||||||
- vgo get -u
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c ./build.sh; fi
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c ./build.sh; fi
|
|
@ -2,8 +2,8 @@ FROM golang:alpine as builder
|
||||||
|
|
||||||
RUN apk update && apk add git
|
RUN apk update && apk add git
|
||||||
|
|
||||||
COPY . $GOPATH/src/github.com/hunterlong/fusioner/
|
COPY . $GOPATH/src/github.com/hunterlong/statup/
|
||||||
WORKDIR $GOPATH/src/github.com/hunterlong/fusioner/
|
WORKDIR $GOPATH/src/github.com/hunterlong/statup/
|
||||||
RUN go get github.com/GeertJohan/go.rice/rice
|
RUN go get github.com/GeertJohan/go.rice/rice
|
||||||
RUN go get -d -v
|
RUN go get -d -v
|
||||||
RUN rice embed-go
|
RUN rice embed-go
|
||||||
|
@ -11,4 +11,4 @@ RUN go install
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT fusioner
|
ENTRYPOINT statup
|
2
build.sh
2
build.sh
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
||||||
APP="fusioner"
|
APP="statup"
|
||||||
|
|
||||||
rice embed-go
|
rice embed-go
|
||||||
|
|
||||||
|
|
4
web.go
4
web.go
|
@ -13,7 +13,7 @@ type dashboard struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RunHTTPServer() {
|
func RunHTTPServer() {
|
||||||
fmt.Println("Fusioner HTTP Server running on http://localhost:9595")
|
fmt.Println("Fusioner HTTP Server running on http://localhost:8080")
|
||||||
css := http.StripPrefix("/css/", http.FileServer(cssBox.HTTPBox()))
|
css := http.StripPrefix("/css/", http.FileServer(cssBox.HTTPBox()))
|
||||||
js := http.StripPrefix("/js/", http.FileServer(jsBox.HTTPBox()))
|
js := http.StripPrefix("/js/", http.FileServer(jsBox.HTTPBox()))
|
||||||
http.Handle("/", http.HandlerFunc(IndexHandler))
|
http.Handle("/", http.HandlerFunc(IndexHandler))
|
||||||
|
@ -29,7 +29,7 @@ func RunHTTPServer() {
|
||||||
http.Handle("/token/create", http.HandlerFunc(CreateServiceHandler))
|
http.Handle("/token/create", http.HandlerFunc(CreateServiceHandler))
|
||||||
http.Handle("/tokens", http.HandlerFunc(ServicesHandler))
|
http.Handle("/tokens", http.HandlerFunc(ServicesHandler))
|
||||||
http.Handle("/users", http.HandlerFunc(UsersHandler))
|
http.Handle("/users", http.HandlerFunc(UsersHandler))
|
||||||
http.ListenAndServe(":9595", nil)
|
http.ListenAndServe(":8080", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func LogoutHandler(w http.ResponseWriter, r *http.Request) {
|
func LogoutHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Reference in New Issue