apiVersion: apps/v1
kind: Deployment
metadata:
  name: environment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: environment
  template:
    metadata:
      labels:
        app: environment
      annotations:
        prometheus.io/scrape: "true"
    spec:
      containers:
        - name: environment
          image: bang5:5000/environment_image
          workingDir: /opt
          command:
            - pdm
            - run
            - uvicorn
            - "--port=8000"
            - "--host=0.0.0.0"
            - "environment:app"
          #          - '--reload'
          ports:
            - containerPort: 8000
---
apiVersion: v1
kind: Service
metadata:
  name: environment
spec:
  ports:
    - { port: 80, targetPort: 8000 }
  selector:
    app: environment
