apiVersion: apps/v1
kind: Deployment
metadata:
  name: rust-web-demo
spec:
  replicas: 3
  selector:
    matchLabels:
      app: rust-web-demo
  template:
    metadata:
      labels:
        app: rust-web-demo
    spec:
      containers:
      - name: rust-web-demo
        image: docker.io/webmakaka/rust-web-demo
        ports:
        - containerPort: 8000
        env:
        - name: ROCKET_ENV
          value: "prod"
        - name: ROCKET_ADDRESS
          value: "0.0.0.0"
        - name: ROCKET_PORT
          value: "8000"
        - name: DATABASE_URL
          valueFrom:
            secretKeyRef:
              name: rust-web-demo-database-url
              key: url
