apiVersion: apps/v1
kind: Deployment
metadata:
  name: concourse-web-deployment
  labels:
    app: concourse-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: concourse-web
  template:
    metadata:
      labels:
        app: concourse-web
    spec:
      containers:
      - name: concourse-web
        image: concourse/concourse
        args: 
        - web
        env:
        - name: CONCOURSE_EXTERNAL_URL
          value: <some_public_server_url>
        - name: CONCOURSE_GITHUB_CLIENT_ID
          value: <some_oauth_github_client_id>
        - name: CONCOURSE_GITHUB_CLIENT_SECRET
          value: <some_oath_github_client_secret>
        - name: CONCOURSE_MAIN_TEAM_GITHUB_USER
          value: <some_github_client_user_name>
        - name: CONCOURSE_POSTGRES_DATABASE
          value: <some_postgres_db_name>
        - name: CONCOURSE_POSTGRES_HOST
          value: postgres-service
        - name: CONCOURSE_POSTGRES_PASSWORD
          value: <some_postgres_db_password>
        - name: CONCOURSE_POSTGRES_USER
          value: <some_postgres_db_user>
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: concourse-web-keys
          mountPath: /concourse-keys
      volumes:
        - name: concourse-web-keys
          persistentVolumeClaim:
            claimName: concourse-web-pvc
