Skip to main content
Version: 1.0.0

Zeet CLI Basics

Make sure you've completed the Getting Started steps in order to run the below commands.

In this guide, we'll deploy and monitor a project using the Zeet CLI.

Deploying

After creating a project, let's deploy (rebuild) it:

Project Paths

The project path (zeet-demo/zeet-demo-node-sample as show below) can be found by selecting a project in your browser, and then copying the part of the URL after https://zeet.co/. For more info, see Getting Started

$ zeet deploy zeet-demo/zeet-demo-node-sample
⛏ Building zeet-demo/zeet-demo-node-sample...
INFO[0000] Using dockerignore file: /zeet_workspace/.dockerignore

# ...

Public Endpoints:
- https://test5.zeet.dev
- https://g03f2pl8ci.execute-api.us-west-2.amazonaws.com/

zeet deploy streams the logs for a deployment, and then prints its public & private endpoints when the deployment is complete.

Retrieving Logs

Our website gets popular, and we want to see how many visitors it's had. For that, we can look at the project's logs with zeet logs:

# you can also add --stage=build & --stage=deployment to get build stage and deployment stage logs, respectively
# and -f to follow the logs
$ zeet logs zeet-demo/zeet-demo-node-sample
10.244.0.118 - - [14/May/2022:01:05:51 +0000] "GET / HTTP/1.1" 200 615 "-" "Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: scaninfo@paloaltonetworks.com" "147.182.205.80"
10.244.0.118 - - [14/May/2022:12:05:30 +0000] "GET / HTTP/1.1" 200 615 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)" "147.182.205.80"
10.244.0.118 - - [14/May/2022:12:05:30 +0000] "GET / HTTP/1.1" 200 615 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)" "167.248.133.45"
10.244.0.118 - - [15/May/2022:12:00:07 +0000] "GET / HTTP/1.1" 200 615 "http://137.184.246.202:80/" "Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: scaninfo@paloaltonetworks.com" "147.182.205.80"
10.244.0.118 - - [15/May/2022:12:46:03 +0000] "GET / HTTP/1.1" 200 615 "http://137.184.246.202:80/" "Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: scaninfo@paloaltonetworks.com" "198.235.24.35"
10.244.0.118 - - [15/May/2022:21:08:45 +0000] "GET / HTTP/1.1" 200 615 "-" "Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: scaninfo@paloaltonetworks.com" "147.182.205.80"
10.244.0.118 - - [16/May/2022:03:01:58 +0000] "GET / HTTP/1.1" 200 615 "-" "Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: scaninfo@paloaltonetworks.com" "147.182.205.80"

Hm... Maybe not as popular as we thought.

Monitoring

With all of these new visitors, let's make sure our site hasn't crashed. We can check it's status using zeet status:

$ zeet status zeet-demo/zeet-demo-node-sample
Status: DEPLOYED
Healthy Replicas: [1/1]

Looks good!

Updating environment variables

Suppose we get even more visitors, and our site's database cannot handle the load. We'll spin up a new, better, database (through Zeet of course!) and update our app's configuration with the new database credentials.

Lucky for us, our project's configuration is stored in environment variables, in accordance with the 12 Factor App. So, we'll just update our env vars:

$ zeet env:set zeet-demo/zeet-demo-node-sample DB_URL=postgres://postgres:123456@zeet-postgres:5432/project
Environment variables set

Cool. We can also view the environment variable with zeet env:get:

$ zeet env:get zeet-demo/zeet-demo-node-sample DB_URL
DB_URL=postgres://postgres:123456@zeet-postgres:5432/project