forked from pulumi/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update go fargate example to build docker image and push to ecr
Showing
8 changed files
with
120 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Start from a Debian image with the latest version of Go installed | ||
# and a workspace (GOPATH) configured at /go. | ||
FROM golang | ||
|
||
# Copy the local package files to the container's workspace. | ||
ADD . /go/src/foo | ||
|
||
# Build the outyet command inside the container. | ||
# (You may fetch or manage dependencies here, | ||
# either manually or with a tool like "godep".) | ||
WORKDIR /go/src/foo | ||
RUN go build -o /go/bin/main | ||
|
||
# Run the outyet command by default when the container starts. | ||
ENTRYPOINT /go/bin/main | ||
|
||
# Document that the service listens on port 80. | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/pulumi/examples/aws-go-fargate/app | ||
|
||
go 1.14 | ||
|
||
require github.com/gorilla/mux v1.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= | ||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"math/rand" | ||
"net/http" | ||
"time" | ||
|
||
"github.com/gorilla/mux" | ||
) | ||
|
||
func main() { | ||
r := mux.NewRouter() | ||
handler := func(w http.ResponseWriter, r *http.Request) { | ||
rand.Seed(time.Now().UnixNano()) | ||
fmt.Fprintf(w, "%d", rand.Intn(100)) | ||
} | ||
r.HandleFunc("/", handler) | ||
s := &http.Server{ | ||
Addr: ":80", | ||
Handler: r, | ||
} | ||
log.Fatal(s.ListenAndServe()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters