cmd/tipgodoc: simplify Dockerfile and fix deployment
Change-Id: Ib2fd1346255467cb790a9e4c37d25f8e8ca136f5 Reviewed-on: https://go-review.googlesource.com/2534 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
dc0000626d
commit
0e66a62615
|
@ -1,14 +1,9 @@
|
||||||
FROM google/appengine-go
|
FROM golang
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update && apt-get install --no-install-recommends -y -q build-essential git
|
||||||
RUN apt-get install --no-install-recommends -y -q curl build-essential git
|
|
||||||
RUN mkdir /goroot && curl https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
|
|
||||||
RUN mkdir /gopath
|
|
||||||
|
|
||||||
ENV GOROOT /goroot
|
# golang sets GOPATH=/go
|
||||||
ENV GOPATH /gopath
|
ADD . /go/src/tipgodoc
|
||||||
ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin
|
RUN go install tipgodoc
|
||||||
|
ENTRYPOINT ["/go/bin/tipgodoc"]
|
||||||
WORKDIR /app
|
EXPOSE 8080 # what kubernetes expects
|
||||||
ADD . /app
|
|
||||||
RUN /bin/bash /app/_ah/build.sh
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
To deploy as an App Engine Manged VM, use gcloud:
|
||||||
|
|
||||||
|
$ gcloud preview app deploy .
|
|
@ -13,4 +13,3 @@ handlers:
|
||||||
|
|
||||||
health_check:
|
health_check:
|
||||||
enable_health_check: False
|
enable_health_check: False
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// Use of this source code is governed by the Apache 2.0
|
// Use of this source code is governed by the Apache 2.0
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build appenginevm
|
|
||||||
|
|
||||||
// Command tipgodoc is the beginning of the new tip.golang.org server,
|
// Command tipgodoc is the beginning of the new tip.golang.org server,
|
||||||
// serving the latest HEAD straight from the Git oven.
|
// serving the latest HEAD straight from the Git oven.
|
||||||
package main
|
package main
|
||||||
|
@ -30,10 +28,11 @@ const (
|
||||||
metaURL = "https://go.googlesource.com/?b=master&format=JSON"
|
metaURL = "https://go.googlesource.com/?b=master&format=JSON"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func main() {
|
||||||
p := new(Proxy)
|
p := new(Proxy)
|
||||||
go p.run()
|
go p.run()
|
||||||
http.Handle("/", p)
|
http.Handle("/", p)
|
||||||
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
type Proxy struct {
|
type Proxy struct {
|
||||||
|
|
Loading…
Reference in New Issue