{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
  "packages": [
    "nodejs@20",
    "ffmpeg@latest",
    "yt-dlp@latest",
    "lazydocker@latest",
    "chisel@latest",
    "entr@latest",
    "act@latest",
    "git-subrepo@latest",
    "opentofu@latest",
    "ggshield@latest",
    "python310@latest",
    "python310Packages.pip@latest",
    "caddy@latest"
  ],
  "env": {
    "DEVBOX_COREPACK_ENABLED": "true",
    "ENV":                     "development",
    "KUBECONFIG":              "$HOME/.kube/futureporn.yaml",
    "VENV_DIR":                ".venv"
  },
  "shell": {
    "init_hook": [
      "echo Welcome to Futureporn devbox",
      ". $VENV_DIR/bin/activate",
      "pip install -r requirements.txt"
    ],
    "scripts": {
      "tunnel":                 "dotenvx run -f ./.kamal/secrets.development -- chisel client bright.fp.sbtp.xyz:9090 R:4000",
      "backup":                 "docker exec -t postgres_db pg_dumpall -c -U postgres > ./backups/dev_`date +%Y-%m-%d_%H_%M_%S`.sql",
      "act":                    "dotenvx run -f ./.kamal/secrets.testing -- act -W ./.gitea/workflows --secret-file .kamal/secrets.development",
      "act:builder":            "dotenvx run -f ./.kamal/secrets.testing -- act -W ./.gitea/workflows/builder.yaml --secret-file .kamal/secrets.testing --var-file .kamal/secrets.testing --insecure-secrets",
      "act:tests":              "dotenvx run -f ./.kamal/secrets.testing -- act -W ./.gitea/workflows/tests.yaml --secret-file .kamal/secrets.testing --var-file .kamal/secrets.testing --insecure-secrets",
      "bright:compile:watch":   "cd ./apps/bright && find . -type f -name \"*.ex\" -o -name \"*.exs\" | entr -r mix compile --warnings-as-errors",
      "bright:compile:watch2":  "cd ./apps/bright && pnpx chokidar-cli \"**/*\" -i \"deps/**\" -i \"_build/**\" -c \"mix compile --warnings-as-errors\"",
      "bright:dev":             "cd ./apps/bright && dotenvx run -f ../../.kamal/secrets.development -e MIX_ENV=dev -- mix phx.server",
      "bright:test:unit:watch": "cd ./apps/bright && pnpx chokidar-cli '**/*' -i \"deps/**\" -i '_build/**' -c 'mix test --only=unit'",
      "bright:act":             "cd ./apps/bright && act --env MIX_ENV=test -W ./.gitea/workflows/tests.yaml --secret-file .kamal/secrets.development",
      "test":                   "act -W ./.gitea/workflows/tests.yaml --secret-file .kamal/secrets.testing --var-file .kamal/secrets.testing && devbox run beep || devbox run boop",
      "beep":                   "ffplay -nodisp -loglevel quiet -autoexit ./apps/beep/beep2.wav",
      "boop":                   "ffplay -nodisp -loglevel quiet -autoexit ./apps/beep/beep1.wav"
    }
  }
}