Commit 57e95f06 authored by Manuel's avatar Manuel

[demo-backend] updated deployment

parent 133b47b5
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: dashboard-backend name: demo-backend
spec: spec:
type: LoadBalancer type: LoadBalancer
selector: selector:
app: dashboard-backend app: demo-backend
ports: ports:
- name: https - name: https
port: 443 port: 8000
targetPort: 443 targetPort: 8000
nodePort: 30469 nodePort: 30470
protocol: TCP protocol: TCP
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: dashboard-backend name: demo-backend
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: dashboard-backend app: demo-backend
template: template:
metadata: metadata:
labels: labels:
app: dashboard-backend app: demo-backend
spec: spec:
containers: containers:
- name: dashboard - name: dashboard
image: alexx882/demo-backend image: alexx882/demo-backend
ports: ports:
- containerPort: 443 - containerPort: 8000
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /certs - mountPath: /certs
......
version: '3'
services:
flask_app:
container_name: flask_app
restart: always
build: .
ports:
- "8000:8000"
command: gunicorn -w 1 -b 0.0.0.0:8000 wsgi:app
nginx:
container_name: nginx
restart: always
build: ./nginx
ports:
- "81:443"
depends_on:
- flask_app
volumes:
- /home/herry/certstuff:/certs
docker-compose up -d --no-deps --build
scp docker-compose.yml herry@live.nope-api.systems:~/reddit_crawler
\ No newline at end of file
scp -r . herry@live.nope-api.systems:~/reddit_crawler
\ No newline at end of file
from app import app from app import app
if __name__ == "__main__": if __name__ == "__main__":
app.run(host="0.0.0.0", port=8000) app.run(host="0.0.0.0", port=8000, ssl_context=("/certs/articonf1.crt","/certs/articonf1.key"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment