avoid CrashLoopBackOff
This commit is contained in:
parent
d2688a6b7b
commit
574ef51ebd
2 changed files with 13 additions and 19 deletions
20
Dockerfile
20
Dockerfile
|
@ -1,8 +1,6 @@
|
|||
# 1. Node.js Build-Stage
|
||||
FROM node:20.18.1 AS build
|
||||
|
||||
RUN echo "Stage 1 startet"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
@ -12,25 +10,21 @@ COPY . .
|
|||
RUN npm install -g npm@11.2.0
|
||||
RUN npx tsc # TypeScript Code kompilieren
|
||||
|
||||
# 2. Rust Build-Stage
|
||||
|
||||
RUN echo "Stage 2 startet"
|
||||
|
||||
# 2. Rust build-Stage
|
||||
FROM rust:1.74.0 AS rust-build
|
||||
RUN cargo install iching
|
||||
|
||||
# 3. Final Node.js Runtime-Stage
|
||||
# 3. Final node.js runtime-Stage
|
||||
FROM node:20.18.1
|
||||
|
||||
RUN echo "Stage 3 startet"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 4 Copy previous builds
|
||||
# 4. Copy previous builds
|
||||
COPY --from=build /app .
|
||||
COPY --from=rust-build /usr/local/cargo/bin/iching /usr/local/bin/iching
|
||||
|
||||
RUN echo "Calling Broker"
|
||||
|
||||
# 5. Run app
|
||||
CMD ["npx", "ts-node", "broker.ts"]
|
||||
#CMD ["npx", "ts-node", "mailsender.ts"]
|
||||
|
||||
#run indefinitely to avoid CrashLoopBackOff
|
||||
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
|
|
@ -19,15 +19,15 @@ spec:
|
|||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
initialDelaySeconds: 40
|
||||
periodSeconds: 25
|
||||
timeoutSeconds: 15
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8080
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 13
|
||||
successThreshold: 2
|
||||
|
|
Loading…
Reference in a new issue