{
  "name": "Immich - Backend, Frontend and ML",
  "service": "immich-server",
  "runServices": [
    "immich-init",
    "immich-server",
    "redis",
    "database",
    "immich-machine-learning"
  ],
  "dockerComposeFile": [
    "../docker/docker-compose.dev.yml",
    "./server/container-compose-overrides.yml"
  ],
  "customizations": {
    "vscode": {
      "extensions": [
        "dbaeumer.vscode-eslint",
        "esbenp.prettier-vscode",
        "svelte.svelte-vscode",
        "ms-vscode-remote.remote-containers",
        "foxundermoon.shell-format",
        "timonwong.shellcheck",
        "rvest.vs-code-prettier-eslint",
        "bluebrown.yamlfmt",
        "vkrishna04.cspell-sync",
        "vitest.explorer",
        "ms-playwright.playwright",
        "ms-azuretools.vscode-docker"
      ],
      "settings": {
        "tasks": {
          "version": "2.0.0",
          "tasks": [
            {
              "label": "Immich API Server (Nest)",
              "type": "shell",
              "command": "[ -f /immich-devcontainer/container-start-backend.sh ] && /immich-devcontainer/container-start-backend.sh || exit 0",
              "isBackground": true,
              "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "dedicated",
                "showReuseMessage": true,
                "clear": false,
                "group": "Devcontainer tasks",
                "close": true
              },
              "runOptions": {
                "runOn": "folderOpen"
              },
              "problemMatcher": []
            },
            {
              "label": "Immich Web Server (Vite)",
              "type": "shell",
              "command": "[ -f /immich-devcontainer/container-start-frontend.sh ] && /immich-devcontainer/container-start-frontend.sh || exit 0",
              "isBackground": true,
              "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "dedicated",
                "showReuseMessage": true,
                "clear": false,
                "group": "Devcontainer tasks",
                "close": true
              },
              "runOptions": {
                "runOn": "folderOpen"
              },
              "problemMatcher": []
            },
            {
              "label": "Build Immich CLI",
              "type": "shell",
              "command": "pnpm --filter cli build:dev"
            }
          ]
        }
      }
    }
  },
  "features": {
    "ghcr.io/devcontainers/features/docker-in-docker:2": {
      // https://github.com/devcontainers/features/issues/1466
      "moby": false
    }
  },
  "forwardPorts": [3000, 9231, 9230, 2283],
  "portsAttributes": {
    "3000": {
      "label": "Immich - Frontend HTTP",
      "description": "The frontend of the Immich project",
      "onAutoForward": "openBrowserOnce"
    },
    "2283": {
      "label": "Immich - API Server - HTTP",
      "description": "The API server of the Immich project"
    },
    "9231": {
      "label": "Immich - API Server - DEBUG",
      "description": "The API server of the Immich project"
    },
    "9230": {
      "label": "Immich - Workers - DEBUG",
      "description": "The workers of the Immich project"
    }
  },
  "overrideCommand": true,
  "workspaceFolder": "/usr/src/app",
  "remoteUser": "root",
  "userEnvProbe": "loginInteractiveShell",
  "remoteEnv": {
    // The location where your uploaded files are stored
    "UPLOAD_LOCATION": "${localEnv:UPLOAD_LOCATION:./library}",
    //  Connection secret for postgres. You should change it to a random password
    //  Please use only the characters `A-Za-z0-9`, without special characters or spaces
    "DB_PASSWORD": "${localEnv:DB_PASSWORD:postgres}",
    //  The database username
    "DB_USERNAME": "${localEnv:DB_USERNAME:postgres}",
    //  The database name
    "DB_DATABASE_NAME": "${localEnv:DB_DATABASE_NAME:immich}"
  }
}
