Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Deployment on Cloud

Diego Nascimento edited this page Nov 8, 2018 · 3 revisions

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.

WeDeploy

#1 Build your production files

The first step is to build for production your web app if you have gatsby installed globally you just need run gatsby build. If not, you can just run yarn build script.

#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.json files. First, open the static/ folder and set wedeploy.json file 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/auth folder and change auth wedeploy.json too.

{
    "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

πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ 🌈 🌈 🌈 🌈 🌈