apiVersion: apps/v1
kind: Deployment
metadata:
  name: mastodon-web
  labels:
    app: mastodon-web
spec:
  selector:
    matchLabels:
      app: mastodon-web
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  template:
    metadata:
      labels:
        app: mastodon-web
    spec:
      containers:
      - name: mastodon
        image: tootsuite/mastodon:v3.5.3@sha256:bd1d81cd1948cb29e9fd640c902d377fc84fe2567589aca0c290b760d57b6a2b
        command: ["bundle", "exec", "rails", "s", "-p", "3000"]
        env:
        - name: LOCAL_DOMAIN
          value: ykzts.technology
        - name: SINGLE_USER_MODE
          value: "true"
        - name: PERSISTENT_TIMEOUT
          value: "620"
        - name: DEFAULT_LOCALE
          value: ja
        ports:
        - containerPort: 3000
        livenessProbe:
          httpGet:
            port: 3000
            path: /health
            httpHeaders:
            - name: Host
              value: ykzts.technology
          initialDelaySeconds: 180
          timeoutSeconds: 15
          periodSeconds: 30
        readinessProbe:
          httpGet:
            port: 3000
            path: /health
            httpHeaders:
            - name: Host
              value: ykzts.technology
          initialDelaySeconds: 180
          timeoutSeconds: 15
          periodSeconds: 30
