Skip to content

06: Deploy to lab

Most of the time, you'll be developing on your local machine. You can also use any front-end oriented preview platforms like Netlify or Vercel (formerly ZEIT Now). But when the time comes, Shoptet Premium provides the official "lab" environment for you.

Install the sofa CLI

🔴 This doesn't exist yet.

First, install a sofa CLI:

npm i -g @shoptet/sofa-cli

Then, login:

sofa login

🖼 TODO browser opens, user logs in

You can now see your shops:

$ sofa list
demoshop.cz

Deploy to lab manually

First, create a sofa.json in your project root like this:

{
  project: "demoshop.cz"
}

Then run:

sofa deploy

This will create a deployment at https://123-branch.demoshopcz.labshoptet.com where "123-branch" is your current Git branch.

If you deployed from master, the URL would be just https://demoshopcz.labshoptet.com.

Deploy via GitHub integration

To simplify your life, you can install SOFA GitHub Application to automate the above for you – each push to a branch will update the branch deployment, and merging to master will update the main lab domain.


Finally, let's see how you push your app to production.