Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: Change the healthcheck route for docker Studio (#33180)

Ivan Vasilov6f3c46f5dace
diff --git a/apps/studio/Dockerfile b/apps/studio/Dockerfile
index 1d3d57dcb4e..23dfdc12c5b 100644
--- a/apps/studio/Dockerfile
+++ b/apps/studio/Dockerfile
@@ -59,5 +59,5 @@ COPY --from=builder /app/apps/studio/.next/standalone ./
COPY --from=builder /app/apps/studio/.next/static ./apps/studio/.next/static
EXPOSE 3000
ENTRYPOINT ["docker-entrypoint.sh"]
-HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD node -e "fetch('http://localhost:3000/api/profile').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
+HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD node -e "fetch('http://localhost:3000/api/platform/profile').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
CMD ["node", "apps/studio/server.js"]
diff --git a/apps/studio/pages/api/platform/auth/[ref]/users/[id]/index.ts b/apps/studio/pages/api/platform/auth/[ref]/users/[id]/index.ts
index ce688897c2f..17cca3b0026 100644
--- a/apps/studio/pages/api/platform/auth/[ref]/users/[id]/index.ts
+++ b/apps/studio/pages/api/platform/auth/[ref]/users/[id]/index.ts
@@ -32,8 +32,8 @@ const handlePatch = async (req: NextApiRequest, res: NextApiResponse) => {
const handleDelete = async (req: NextApiRequest, res: NextApiResponse) => {
const { id } = req.query
- const { error } = await supabase.auth.admin.deleteUser(id as string)
+ const { data, error } = await supabase.auth.admin.deleteUser(id as string)
if (error) return res.status(400).json({ error: { message: error.message } })
- return res.status(200).send(undefined)
+ return res.status(200).json(data)
}
diff --git a/tests/local-studio-tests/package.json b/tests/local-studio-tests/package.json
index a10637c1ec3..5121ff429db 100644
--- a/tests/local-studio-tests/package.json
+++ b/tests/local-studio-tests/package.json
@@ -6,10 +6,10 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"env:setup": "supabase start -x studio && supabase status --output json > keys.json && node scripts/generate-env.js",
- "pretest": "pnpm run env:setup",
+ "pretest": "pnpm env:setup",
"test": "playwright test",
"posttest": "supabase stop --no-backup",
- "codegen:setup": "pnpm run env:setup && NODE_ENV=test pnpm --prefix ../apps/studio run dev",
+ "codegen:setup": "pnpm env:setup && NODE_ENV=test pnpm --prefix ../../apps/studio dev",
"codegen": "playwright codegen http://localhost:8082/project/default",
"clean": "rimraf node_modules"
},