chore: clean up environment variable usage and formatting in configuration files
- Updated docker-compose.yaml to use double quotes for version and port mappings. - Removed DEPLOYMENT_PROVIDER from global environment variables in turbo.json and Dockerfile. - Adjusted dashboard build command in package.json to remove DEPLOYMENT_PROVIDER. - Cleaned up .env.example by removing the DEPLOYMENT_PROVIDER comment. - Simplified SvelteKit adapter condition in svelte.config.js.
This commit is contained in:
@@ -5,7 +5,6 @@ PRIVATE_SUPABASE_SERVICE_ROLE=
|
||||
|
||||
# Selfhosting - should be true if you are selfhosting
|
||||
PUBLIC_IS_SELFHOSTED=false
|
||||
DEPLOYMENT_PROVIDER= # docker or empty. empty will use adapter-auto for sveltekit build
|
||||
|
||||
# Unsplash setup - Optional if you want to use Unsplash images
|
||||
UNSPLASH_API_KEY=
|
||||
|
||||
@@ -31,7 +31,6 @@ COPY apps/dashboard ./apps/dashboard
|
||||
|
||||
# Set env vars for SvelteKit to use Node adapter
|
||||
ENV PUBLIC_IS_SELFHOSTED=true \
|
||||
DEPLOYMENT_PROVIDER=docker \
|
||||
PUBLIC_SUPABASE_URL=$PUBLIC_SUPABASE_URL \
|
||||
PUBLIC_SUPABASE_ANON_KEY=$PUBLIC_SUPABASE_ANON_KEY \
|
||||
PRIVATE_SUPABASE_SERVICE_ROLE=$PRIVATE_SUPABASE_SERVICE_ROLE \
|
||||
@@ -68,7 +67,6 @@ EXPOSE 3000
|
||||
# Set environment variables for production
|
||||
ENV NODE_ENV=production \
|
||||
PUBLIC_IS_SELFHOSTED=true \
|
||||
DEPLOYMENT_PROVIDER=docker \
|
||||
PUBLIC_SUPABASE_URL=$PUBLIC_SUPABASE_URL \
|
||||
PUBLIC_SUPABASE_ANON_KEY=$PUBLIC_SUPABASE_ANON_KEY \
|
||||
PRIVATE_SUPABASE_SERVICE_ROLE=$PRIVATE_SUPABASE_SERVICE_ROLE \
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
import 'dotenv/config';
|
||||
|
||||
// import adapterAuto from '@sveltejs/adapter-auto';
|
||||
import adapterNode from '@sveltejs/adapter-node';
|
||||
import adapterVercel from '@sveltejs/adapter-vercel';
|
||||
import path from 'path';
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
|
||||
import 'dotenv/config';
|
||||
|
||||
const useNodeAdapter =
|
||||
process.env.PUBLIC_IS_SELFHOSTED === 'true' && process.env.DEPLOYMENT_PROVIDER === 'docker';
|
||||
const useNodeAdapter = process.env.PUBLIC_IS_SELFHOSTED === 'true';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
|
||||
Reference in New Issue
Block a user