Merge pull request #4 from GoogleCloudPlatform/master

Merge from upstream
This commit is contained in:
Colin Nelson 2018-09-27 09:02:19 -07:00 committed by GitHub
commit d5929bb8af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 9 deletions

View file

@ -66,3 +66,4 @@ profiles:
googleCloudBuild:
diskSizeGb: 300
machineType: "N1_HIGHCPU_32"
timeout: 4000s

View file

@ -26,7 +26,7 @@ group = "adservice"
version = "0.1.0-SNAPSHOT" // CURRENT_OPENCENSUS_VERSION
def opencensusVersion = "0.15.0" // LATEST_OPENCENSUS_RELEASE_VERSION
def grpcVersion = "1.10.1" // CURRENT_GRPC_VERSION
def grpcVersion = "1.15.0" // CURRENT_GRPC_VERSION
def prometheusVersion = "0.3.0"
tasks.withType(JavaCompile) {

View file

@ -1,7 +1,21 @@
FROM python:3.6
FROM python:3-alpine as base
FROM base as builder
RUN apk add --update --no-cache \
gcc \
linux-headers \
make \
musl-dev \
python-dev \
g++
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN pip install --install-option="--prefix=/install" -r requirements.txt
FROM base
COPY --from=builder /install /usr/local
COPY . .
ENTRYPOINT ./loadgen.sh

View file

@ -1,4 +1,4 @@
#!/bin/bash -eu
#!/bin/sh -eu
#
# Copyright 2018 Google LLC
#

View file

@ -1,7 +1,13 @@
FROM node:8
RUN GRPC_HEALTH_PROBE_VERSION=v0.1.0-alpha.1 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
FROM node:8-alpine as base
FROM base as builder
# Some packages (e.g. @google-cloud/profiler) require additional
# deps for post-install scripts
RUN apk add --update --no-cache \
python \
make \
g++
WORKDIR /usr/src/app
@ -9,8 +15,18 @@ COPY package*.json ./
RUN npm install --only=production
FROM base
RUN GRPC_HEALTH_PROBE_VERSION=v0.1.0-alpha.1 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY . .
EXPOSE 50051
CMD [ "node", "index.js" ]
ENTRYPOINT [ "node", "index.js" ]