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 containDEPLOYMENT_PLATFORM
equal tonetlify
. -
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 theEnvironment 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 oncreate a new site
-
Select
Deploy from GitHub
, and then select your repository -
Update the
build
command to bepnpm run build
-
Update the
functions
directory to be.netlify/functions-internal
-
Update the
publish
directory to bedist
-
The most important step here would now be to add all of your Environment Variables from the local
.env
file by clicking the buttonAdd environment variable
below thepublish
directory field. Make sure to have an Envrionment Variable namedDEPLOYMENT_PLATFORM
set tonetlify
, 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"