Saltearse al contenido

Deploy To Vercel

Esta página aún no está disponible en tu idioma.

LaunchFast Starter Kits can be deployed to Vercel with 0-config setup. Following are the steps to ensure a hassle-free experience of deployment of LaunchFast to Vercel.

Terminal to Vercel Deployments

  • Do an initial deploy to Vercel with vercel deploy --prod.
  • Once done, go to Vercel settings and paste your whole .env file in the Environment Variables section in project settings.
  • With that done, deploy again with Vercel deploy --prod and you are good to go.
  • GitHub for Vercel Deployments

  • Go to vercel.com/dashboard, click on Add new, and Project.
  • Select your GitHub repository.
  • The most important step here would now be to add all of your Environment Variables from the local .env file by clicking the button Environment Variables toggle. Make sure to have an Envrionment Variable named DEPLOYMENT_PLATFORM set to vercel, and in general use ... as the value for the environment variables that are not being used but set them anyways to not encounter build time errors (ofcourse, that won’t run in production and this is just to test the system out). Rest, below are some of the values that can be used for just deploying and then iterating.
  • Terminal window
    # Deployment Platform Environment Variable
    DEPLOYMENT_PLATFORM="vercel"
    # Emails
    ## "resend" or "nodemailer"
    EMAIL_PROVIDER="resend"
    ## Resend Environment Variables
    RESEND_KEY="..."
    ## SMTP2GO Environment Variables
    SMTP2GO_USERNAME="..."
    SMTP2GO_PASSWORD="..."
    ## When a user will sign up using credentials,
    ## Visiting this URL will allow them to register them as verified in your db
    ## An email is sent to the user with the following url appended with a randomly generated token query parameter
    EMAIL_VERIFICATION_ENDPOINT_URL="https://launchfast-astro-ts.vercel.app/api/email/verify"
    EMAIL_PASSWORD_RESET_URL="https://launchfast-astro-ts.vercel.app/forgot-password"
    # Database
    ## "pg" OR "redis" OR "mongodb" OR "sqlite" OR "firestore"
    DATABASE_TYPE="pg"
    ## Redis (/Upstash) Environment Variable
    REDIS_URL="redis://default:...@...upstash.io:..."
    ## Postgres (/Neon) Environment Variable
    POSTGRES_URL="postgresql://neondb_owner:...@...-pooler.us-east-2.aws.neon.tech/neondb?sslmode=require"
    ## MongoDB Environment Variable
    MONGODB_URL="mongodb+srv://<username>:<password>@<prefix>.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
    ## SQLite Environment Variable
    SQLITE_URL="libsql://....turso.io"
    SQLITE_AUTH_TOKEN="..."
    # Storage
    ## "s3" or "supabase" or "firebase"
    STORAGE_PROVIDER="firebase"
    ## Supabase
    SUPABASE_BUCKET_NAME="..."
    SUPABASE_URL="https://....supabase.co"
    SUPABASE_ANON_KEY="............"
    ## AWS S3 (/Cloudflare R2)
    AWS_KEY_ID="..." # Set to Cloudflare's R2 Secret Key if using Cloudflare R2
    AWS_SECRET_ACCESS_KEY=".../...+" # Set to Cloudflare's R2 Secret Access Key if using Cloudflare R2
    AWS_S3_BUCKET_NAME="...-bucket-0" # Set to Cloudflare's R2 Bucket Name if using Cloudflare R2
    AWS_REGION_NAME="eu-north-1" # Set to us-east-1 only if using Cloudflare R2
    CLOUDFLARE_R2_ACCOUNT_ID="..."
    ## Firebase
    FIREBASE_PROJECT_ID="..."
    FIREBASE_PRIVATE_KEY_ID="..."
    FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
    FIREBASE_CLIENT_EMAIL="firebase-adminsdk-..@...iam.gserviceaccount.com"
    FIREBASE_CLIENT_ID="..."
    FIREBASE_STORAGE_BUCKET="gs://...appspot.com"
    # Authentication
    ## Twitter Environment Variables
    TWITTER_CLIENT_ID="..."
    TWITTER_CLIENT_SECRET="..."
    TWITTER_AUTH_CALLBACK_URL="http://127.0.0.1:3000/api/auth/callback/twitter"
    ## Google OAuth 2.0 Environment Variables
    GOOGLE_AUTH_ID="....apps.googleusercontent.com"
    GOOGLE_AUTH_SECRET="...-...-..."
    GOOGLE_AUTH_CALLBACK_URL="http://localhost:3000/api/auth/callback/google"
    # Payments
    ## Stripe Environment Variables
    STRIPE_SECRET_KEY="sk_live_..."
    STRIPE_WEBHOOK_SIG="..."
    # AI
    ## OpenAI Environment Variable
    OPENAI_API_KEY="sk-..."
    # Social Media
    ## Telegram Bot Environment Variables
    TELEGRAM_BOT_TOKEN="..."
    # Website
    ## Website URL
    SITE="https://launchfast-nextjs-ts.vercel.app"
    ## Admin Request Verification Key
    PRIVATE_ACCESS_KEY="..." # generate using `openssl rand -base64 32`
    ## JWT Verification Key
    SECRET_KEY="..."
    ## Server Specific Configurations
    NODE_VERSION="18"
    HOST="0.0.0.0"
    PORT="3000"