---
apiVersion: apps/v1
kind: Deployment
metadata:
    name: users-backend
    labels:
        app: users-backend
    namespace: example
spec:
    replicas: 1
    selector:
        matchLabels:
            app: users-backend
    template:
        metadata:
            labels:
                app: users-backend
        spec:
            containers:
                - name: users-backend-service
                  image: 636411801460.dkr.ecr.us-east-2.amazonaws.com/users_server:latest
                  imagePullPolicy: Always
                  ports:
                     - containerPort: 8000
                  env:
                      - name: DATABASE_ENGINE
                        value: POSTGRESQL
                      - name: POSTGRES_DB
                        value: thoughts
                      - name: POSTGRES_USER
                        value: postgres
                      - name: POSTGRES_PASSWORD
                        value: somepassword
                      - name: POSTGRES_PORT
                        value: "5432"
                      - name: POSTGRES_HOST
                        value: "127.0.0.1"

                - name: users-backend-db
                  image: 636411801460.dkr.ecr.us-east-2.amazonaws.com/users_backend_db:latest
                  imagePullPolicy: Always
