apiVersion: v1
kind: Service
metadata:
  name: social-app
  namespace: atproto
spec:
  selector:
    app: social-app
  ports:
    - port: 8100
      targetPort: 8100
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: social-app
  namespace: atproto
spec:
  replicas: 1
  selector:
    matchLabels:
      app: social-app
  template:
    metadata:
      labels:
        app: social-app
    spec:
      containers:
        - name: social-app
          image: registry/social-app
          command: ["/usr/bin/bskyweb", "serve"]
          ports:
            - containerPort: 8100
          env:
            - name: ATP_APPVIEW_HOST
              value: "https://public.api.bsky.app"
            - name: EXPO_PUBLIC_BLUESKY_PROXY_DID
              value: "did:web:api.bsky.app"
            - name: EXPO_PUBLIC_ENV
              value: "production"
          livenessProbe:
            httpGet:
              path: /
              port: 8100
            initialDelaySeconds: 10
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /
              port: 8100
            initialDelaySeconds: 5
            periodSeconds: 5
