Commit 57e95f06 authored by Manuel's avatar Manuel

[demo-backend] updated deployment

parent 133b47b5
apiVersion: v1
kind: Service
metadata:
name: dashboard-backend
name: demo-backend
spec:
type: LoadBalancer
selector:
app: dashboard-backend
app: demo-backend
ports:
- name: https
port: 443
targetPort: 443
nodePort: 30469
port: 8000
targetPort: 8000
nodePort: 30470
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dashboard-backend
name: demo-backend
spec:
replicas: 1
selector:
matchLabels:
app: dashboard-backend
app: demo-backend
template:
metadata:
labels:
app: dashboard-backend
app: demo-backend
spec:
containers:
- name: dashboard
image: alexx882/demo-backend
ports:
- containerPort: 443
- containerPort: 8000
imagePullPolicy: Always
volumeMounts:
- 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
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