Merge pull request #4 from GoogleCloudPlatform/master
Merge from upstream
This commit is contained in:
commit
d5929bb8af
5 changed files with 40 additions and 9 deletions
|
@ -66,3 +66,4 @@ profiles:
|
||||||
googleCloudBuild:
|
googleCloudBuild:
|
||||||
diskSizeGb: 300
|
diskSizeGb: 300
|
||||||
machineType: "N1_HIGHCPU_32"
|
machineType: "N1_HIGHCPU_32"
|
||||||
|
timeout: 4000s
|
||||||
|
|
|
@ -26,7 +26,7 @@ group = "adservice"
|
||||||
version = "0.1.0-SNAPSHOT" // CURRENT_OPENCENSUS_VERSION
|
version = "0.1.0-SNAPSHOT" // CURRENT_OPENCENSUS_VERSION
|
||||||
|
|
||||||
def opencensusVersion = "0.15.0" // LATEST_OPENCENSUS_RELEASE_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"
|
def prometheusVersion = "0.3.0"
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
|
|
|
@ -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 .
|
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 . .
|
COPY . .
|
||||||
ENTRYPOINT ./loadgen.sh
|
ENTRYPOINT ./loadgen.sh
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash -eu
|
#!/bin/sh -eu
|
||||||
#
|
#
|
||||||
# Copyright 2018 Google LLC
|
# Copyright 2018 Google LLC
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
FROM node:8
|
FROM node:8-alpine as 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 && \
|
FROM base as builder
|
||||||
chmod +x /bin/grpc_health_probe
|
|
||||||
|
# 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
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
@ -9,8 +15,18 @@ COPY package*.json ./
|
||||||
|
|
||||||
RUN npm install --only=production
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 50051
|
EXPOSE 50051
|
||||||
|
|
||||||
CMD [ "node", "index.js" ]
|
ENTRYPOINT [ "node", "index.js" ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue