Update app.yaml with python sidecar
Build Institutional Trader / build-and-deploy (push) Successful in 2m39s
Details
Build Institutional Trader / build-and-deploy (push) Successful in 2m39s
Details
This commit is contained in:
parent
03a7e73b37
commit
fe48536e9b
32
k8s/app.yaml
32
k8s/app.yaml
|
|
@ -34,6 +34,38 @@ spec:
|
|||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
- name: python-service
|
||||
image: python:3.11-slim
|
||||
command: ['sh', '-c', 'pip install --no-cache-dir -r requirements.txt && uvicorn main:app --host 0.0.0.0 --port 8010']
|
||||
workingDir: /shared-code
|
||||
ports:
|
||||
- containerPort: 8010
|
||||
env:
|
||||
- name: USE_LOCAL_DB
|
||||
value: "true"
|
||||
- name: LOCAL_DB_HOST
|
||||
value: "192.168.8.151"
|
||||
- name: LOCAL_DB_PORT
|
||||
value: "5432"
|
||||
- name: LOCAL_DB_USER
|
||||
value: "postgres"
|
||||
- name: LOCAL_DB_PASSWORD
|
||||
value: "postgres"
|
||||
- name: LOCAL_DB_NAME
|
||||
value: "institutional_trader"
|
||||
volumeMounts:
|
||||
- name: shared-code
|
||||
mountPath: /shared-code
|
||||
initContainers:
|
||||
- name: copy-python-code
|
||||
image: 192.168.8.250:5000/market:latest
|
||||
command: ['sh', '-c', 'cp -r /app/backend/python_service/* /shared-code/']
|
||||
volumeMounts:
|
||||
- name: shared-code
|
||||
mountPath: /shared-code
|
||||
volumes:
|
||||
- name: shared-code
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
|||
Loading…
Reference in New Issue