Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start with a base image containing golang runtime
FROM golang:1.20
FROM golang:1.21

# Set the working directory in the container
WORKDIR /go/src/app
Expand All @@ -10,6 +10,16 @@ COPY go.mod go.sum ./
# Download the dependencies
RUN go mod download

# Install gcloud CLI
RUN apt-get update && apt-get install -y \
curl \
apt-transport-https \
ca-certificates && \
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update && apt-get install -y google-cloud-sdk google-cloud-cli-app-engine-go && \
rm -rf /var/lib/apt/lists/*

# Copy the current directory contents into the container at /go/src/app
COPY ../ .

Expand Down
10 changes: 5 additions & 5 deletions gae/app.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
runtime: go120
runtime: go121
app_engine_apis: true
automatic_scaling:
max_idle_instances: 1
max_concurrent_requests: 100
max_idle_instances: 1
max_concurrent_requests: 100

handlers:
- url: /.*
script: auto
- url: /.*
script: auto
2 changes: 1 addition & 1 deletion gae/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ func main() {
r.Methods("OPTIONS").HandlerFunc(preflight)
variants := r.Path("/{variant}").Subrouter()
variants.Methods("POST").HandlerFunc(resolve)
variants.Path("/resolve-with-options").Methods("POST").HandlerFunc(resolveWithOptions)
variants.Methods("GET").HandlerFunc(start)
r.Path("/start-with-options/{variant}").Methods("GET").HandlerFunc(startWithOptions)
r.Path("/resolve-with-options/{variant}").Methods("POST").HandlerFunc(resolveWithOptions)
r.Path("/").HandlerFunc(listVariants)
http.Handle("/", r)
appengine.Main()
Expand Down
Loading