backend:
  command:
    - uvicorn
    - app.main:app
    - --host
    - "0.0.0.0"
    - --port
    - "8000"
    - --workers
    - "1"
  initContainers:
    - name: init-permissions
      image: busybox:1.36
      command:
        - sh
        - -c
        - |
          echo "Fixing permissions on /app/data..."
          chown -R 1000:1000 /app/data
          chmod -R 755 /app/data
          ls -la /app/data
          echo "Permissions fixed successfully"
      volumeMounts:
        - name: data
          mountPath: /app/data
      securityContext:
        runAsUser: 0
        runAsNonRoot: false
  env:
    - name: PORT
      value: "8000"
    - name: LOG_LEVEL
      value: "INFO"
    - name: LOG_FORMAT
      value: "json"
    - name: WORKERS
      value: "4"
    - name: DATABASE_URL
      value: "sqlite+aiosqlite:////app/data/archi-dev.db"
    - name: SQLITE_TMPDIR
      value: "/tmp"
