Skip to content

Deploy To Netlify

LaunchFa.st can be deployed to Netlify with 0-config setup. Following are the steps to ensure a hassle-free experience of deployment of LaunchFa.st to Netlify.

Terminal to Netlify Deployments

  • Locally, set .env to contain DEPLOYMENT_PLATFORM equal to netlify.

  • Perform the build of the app using pnpm run build and make sure to check if the terminal outputs @netlify being used as the Astro adapter used to build.

  • Once done, verify if your app now has a .functions-internal directory.

  • Great! Now do a deploy to Netlify with netlify deploy --prod.

  • Once done, go to Netlify settings and paste your whole .env file in the Environment Variables section.

  • With that done, deploy again with netlify deploy --prod and now everything is good to go!

GitHub for Netlify Deployments

  • Go to app.netlify.com, and then click on create a new site

  • Select Deploy from GitHub, and then select your repository

  • Update the build command to be pnpm run build

  • Update the functions directory to be .netlify/functions-internal

  • Update the publish directory to be dist

  • The most important step here would now be to add all of your Environment Variables from the local .env file by clicking the button Add environment variable below the publish directory field. Make sure to have an Envrionment Variable named DEPLOYMENT_PLATFORM set to netlify, 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.

DEPLOYMENT_PLATFORM="netlify"
GOOGLE_AUTH_CALLBACK_URL="https://your-site.netlify.app/api/auth/callback/google"
GOOGLE_AUTH_ID="....apps.googleusercontent.com"
GOOGLE_AUTH_SECRET="...-...-..."
TWITTER_AUTH_CALLBACK_URL="https://your-site.netlify.app/api/auth/callback/twitter"
TWITTER_CLIENT_ID="..."
TWITTER_CLIENT_SECRET="..."
HOST="0.0.0.0"
NODE_VERSION="18"
PORT="3000"
PRIVATE_ACCESS_KEY="..."
PUBLIC_FONT_NAME="Archivo"
RESEND_KEY="re_..."
SECRET_KEY="..."
SMTP2GO_PASSWORD="..."
SMTP2GO_USERNAME="..."
STRIPE_SECRET_KEY="sk_live_..."
UPSTASH_REDIS_REST_TOKEN="..."
UPSTASH_REDIS_REST_URL="https://....upstash.io"