by asher_owo
Here's a clear and helpful post you can use for your query on Supabase:
Hello,
I'm experiencing an issue while running my Nuxt application in Docker. While npm run dev and npm run build work perfectly fine locally, I encounter an error when trying to run it in Docker.
Docker Command:
docker run -p 3000:3000 --env-file .\.env image_name
Current Configuration in nuxt.config.ts:
export default defineNuxtConfig({
supabase: {
url: process.env.SUPABASE_URL,
key: process.env.SUPABASE_KEY,
secretKey: process.env.SUPABASE_SECRET_KEY
}
});
Contents of .env:
SUPABASE_URL=...
SUPABASE_KEY=....
SUPABASE_SECRET_KEY=....
Error Message:
Your project's URL and Key are required to create a Supabase client! Check your Supabase project's API settings to find these values https://supabase.com/dashboard/project/_/settings/api
Any guidance or suggestions to resolve this issue would be greatly appreciated!
Thank you!
The user is experiencing an issue with running a Nuxt application in Docker. While the application works locally, it fails in Docker due to environment variables not being accessible. The user seeks guidance on configuring Docker to pass these variables correctly.
i noticed here that they just had ```export default defineNuxtConfig({ modules: ['@nuxtjs/supabase'], })