Skip to content

subZero Cloud

Signup & Login

For deploying the app we'll need a subzero.cloud account, if you don't have one you can create it with:

subzero cloud signup

? Enter your invite code ********-****-****-****-************
? Enter your name Dwight Schrute
? Enter your email dschrute@email.com
? Enter your password ****
Account created

Login with:

subzero cloud login


? Enter your email dschrute@email.com                  
? Enter your password ****
Login succeeded

Prepare Infrastructure

In the root folder of your app execute:

subzero cloud app-create


? Enter your application name demo1
? Enter your domain (ex: myapp.subzero.cloud) dschrute-demo1.subzero.cloud
? Would you like subzero to create a database for you? Yes (db running in container, for light use)
? Enter the database administrator account superuser
? Enter the database administrator account password *************
? Enter your jwt secret ********************************
? Enter the db name app
? Enter the db schema api
? Enter the db authenticator role authenticator
? Enter the db authenticator role password *****************
? Enter the db anonymous role anonymous
? Are you sure you want to create this application? Yes
Application b52dcecc-f700-4309-9a61-38af41508030 created

This will bring up the infrastructure for your app on subzero.cloud, check out the following endpoints

but the database is empty so not much to do there for now.

Also a subzero-app.json file is created in your project folder, this is to identify your app with subzero.cloud, so don't delete it.

Deploy

Make sure you have the database migrations folder ready for deploying it to PostgreSQL instance running in subzero.cloud (see Managing Migrations for details).

Now for the last part of the deployment do:

subzero cloud app-deploy

? Enter the database administrator account password *************
Logging in to subzero.cloud docker registry..
Login Succeeded                                                                                                                                                


Sending build context to Docker daemon  40.96kB                                                                                                                
Step 1/5 : FROM openresty/openresty:jessie                                                                                                                     
 ---> 2651c15a0658                                                                                                                                             
Step 2/5 : COPY entrypoint.sh /entrypoint.sh                                                                                                                   
 ---> dffa292f13af
Step 3/5 : COPY nginx /usr/local/openresty/nginx
 ---> d6f39fd98225
Step 4/5 : COPY lualib /usr/local/openresty/lualib
 ---> 6bf94d8d6a97
Step 5/5 : ENTRYPOINT ["/entrypoint.sh"]
 ---> Running in 7d505af48a50
 ---> 036d363f58e9
Removing intermediate container 7d505af48a50
Successfully built 036d363f58e9
Successfully tagged openresty:latest

The push refers to a repository [registry.subzero.cloud/appid-b52dcecc-f700-4309-9a61-38af41508030/openresty]
9c774229090e: Preparing
b9ba72e6327c: Preparing
556c7a517ae4: Preparing
1b9e22042c7f: Preparing
5d6cbe0dbcf9: Preparing
556c7a517ae4: Pushed
9c774229090e: Pushed
b9ba72e6327c: Pushed
5d6cbe0dbcf9: Pushed
1b9e22042c7f: Pushed
v0.1.0: digest: sha256:b851e387d86c7458473102047cd3f4d6fcf5d0894b080fd2db169b93bbeb07ef size: 1365



Adding registry tables to db:pg://superuser:@ip-54-175-00-00.db.subzero.cloud:33544/app
Deploying changes to db:pg://superuser:@ip-54-175-00-00.db.subzero.cloud:33544/app
  + 0000000001-initial .. ok

psql:deploy/0000000001-initial.sql:22: NOTICE:  role "authenticator" is already a member of role "anonymous"

Application b52dcecc-f700-4309-9a61-38af41508030 updated

Done!