Add client and api deployment
This commit is contained in:
parent
7e4a5c1082
commit
9de6690b24
|
@ -0,0 +1,59 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: api
|
||||||
|
labels:
|
||||||
|
app: api
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 5000
|
||||||
|
selector:
|
||||||
|
app: api
|
||||||
|
tier: backend
|
||||||
|
type: LoadBalancer
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: api
|
||||||
|
labels:
|
||||||
|
app: api
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: api
|
||||||
|
tier: backend
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: api
|
||||||
|
tier: backend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: api:prod
|
||||||
|
name: api
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: api-db
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres-secrets
|
||||||
|
key: password
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres-secrets
|
||||||
|
key: username
|
||||||
|
- name: DATABASE_URL
|
||||||
|
value: postgresql://$(POSTGRES_USER):$(POSTGRES_PASS)@api-db/$(POSTGRES_DB)
|
||||||
|
- name: APP_SETTINGS
|
||||||
|
value: src.config.ProductionConfig
|
||||||
|
- name: PORT
|
||||||
|
value: "5000"
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
||||||
|
name: api
|
|
@ -0,0 +1,41 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: client
|
||||||
|
labels:
|
||||||
|
app: client
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: client
|
||||||
|
tier: frontend
|
||||||
|
type: LoadBalancer
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: client
|
||||||
|
labels:
|
||||||
|
app: client
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: client
|
||||||
|
tier: frontend
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: client
|
||||||
|
tier: frontend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: client:prod
|
||||||
|
name: client
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: client
|
|
@ -7,3 +7,4 @@ flask-cors==3.0.10
|
||||||
flask-bcrypt==1.0.1
|
flask-bcrypt==1.0.1
|
||||||
pyjwt==2.6.0
|
pyjwt==2.6.0
|
||||||
gunicorn==20.1.0
|
gunicorn==20.1.0
|
||||||
|
Werkzeug==2.3.7
|
Loading…
Reference in New Issue