UNPKG

@underpostnet/underpost

Version:
121 lines (112 loc) 3.55 kB
apiVersion: apps/v1 kind: Deployment metadata: name: fastapi-backend labels: app: fastapi-backend spec: replicas: 2 selector: matchLabels: app: fastapi-backend template: metadata: labels: app: fastapi-backend spec: containers: - name: fastapi-backend-container image: localhost/fastapi-backend:latest imagePullPolicy: IfNotPresent ports: - containerPort: 8000 name: http-api env: - name: POSTGRES_SERVER value: postgres-service - name: POSTGRES_PORT value: '5432' - name: POSTGRES_DB valueFrom: secretKeyRef: name: fastapi-postgres-credentials key: POSTGRES_DB - name: POSTGRES_USER valueFrom: secretKeyRef: name: fastapi-postgres-credentials key: POSTGRES_USER - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: fastapi-postgres-credentials key: POSTGRES_PASSWORD - name: PROJECT_NAME value: 'Full Stack FastAPI Project' - name: STACK_NAME value: 'full-stack-fastapi-project' - name: BACKEND_CORS_ORIGINS value: 'http://localhost,http://localhost:5173,https://localhost,https://localhost:5173' - name: SECRET_KEY valueFrom: secretKeyRef: name: fastapi-backend-config-secret key: SECRET_KEY - name: FIRST_SUPERUSER valueFrom: secretKeyRef: name: fastapi-backend-config-secret key: FIRST_SUPERUSER - name: FIRST_SUPERUSER_PASSWORD valueFrom: secretKeyRef: name: fastapi-backend-config-secret key: FIRST_SUPERUSER_PASSWORD - name: USERS_OPEN_REGISTRATION value: 'True' # - name: SMTP_HOST # valueFrom: # secretKeyRef: # name: fastapi-backend-config-secret # key: SMTP_HOST # - name: SMTP_USER # valueFrom: # secretKeyRef: # name: fastapi-backend-config-secret # key: SMTP_USER # - name: SMTP_PASSWORD # valueFrom: # secretKeyRef: # name: fastapi-backend-config-secret # key: SMTP_PASSWORD - name: EMAILS_FROM_EMAIL value: 'info@example.com' - name: SMTP_TLS value: 'True' - name: SMTP_SSL value: 'False' - name: SMTP_PORT value: '587' livenessProbe: httpGet: path: /docs port: 8000 initialDelaySeconds: 30 periodSeconds: 20 timeoutSeconds: 10 failureThreshold: 3 readinessProbe: httpGet: path: /docs port: 8000 initialDelaySeconds: 30 periodSeconds: 20 timeoutSeconds: 10 failureThreshold: 3 resources: requests: cpu: 200m memory: 256Mi limits: cpu: 1000m memory: 1Gi