
apiVersion: apps/v1
kind: Deployment
metadata:
  name: django-assessment-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: django-assessment
  template:
    metadata:
      labels:
        app: django-assessment
    spec:
      containers:
      - name: django-assessment
        image: vandorjw/django-assessment:local
        imagePullPolicy: Always
        env:
          - name: "DATABASE_URL"
            value: "postgresql://django:django@postgres-service.default.svc.cluster.local:5432/assessment"
          - name: "DJANGO_DEBUG"
            value: "True"
          - name: "DJANGO_SETTINGS_MODULE"
            value: "demo.settings"
          - name: "PYTHONPATH"
            value: "/app"
          - name: "STATIC_ROOT"
            value: "/app/public"
        ports:
        - containerPort: 5000
          protocol: TCP
          name: dashboard
