Deployment on Cloud
Hey, it's great to see you here! π
Here, in this article, I'll teach you how to deploy your website started from Gatsby Boilerplate on WeDeploy.
TL;DR
This guide teach you how to deploy using WeDeploy, but you can use the same strategy of deployment exposing
publicfolder to your favorite host folder.
WeDeploy
#1 Build your production files
The first step is to build for production your web app if you have
gatsbyinstalled globally you just need rungatsby build. If not, you can just runyarn buildscript.
#2 Create an account and create Hosting and Auth WeDeploy services
The second step is to create your account or if you have it, create a new project containing a new WeDeploy Hosting service and a WeDeploy Auth service.
#3 Create or update existing wedeploy.json files
The third step is to verify our
wedeploy.jsonfiles. First, open thestatic/folder and setwedeploy.jsonfile to the WeDeploy service-id that you have created:
{
"id": "<your-hosting-service-id>",
"image": "wedeploy/hosting:2.0.1"
}After that, enter on
static/authfolder and change authwedeploy.jsontoo.
{
"id": "<your-auth-service-id>",
"image": "wedeploy/auth:2.8.0",
"env": {
"WEDEPLOY_AUTH_SECURE_FIELDS": "providers, email, password, resetKey, supportedScopes",
"WEDEPLOY_AUTH_PASSWORD": "true"
}
}For more information configuring this wedeploy.json for auth service, check this link.
#4 Fire!
Considering that you have installed wedeploy command line interface, if not, check this link
Just fire 'we deploy' on public/ and on public/auth folder to deploy your Gatsby Boilerplate instance to the cloud and see magic happening
π₯ π₯ π₯ π₯ π₯ π π π π π