subZero Cloud

Login

For deploying the app we'll need a subzero.cloud account

Login with:

subzero cloud login
in a build script you can use:
subzero cloud login --email $SUBZERO_CLOUD_USER --password $SUBZERO_CLOUD_PASSWORD

Configure

To deploy a local project to subzero.cloud, you'll need to link it with the application configured in your subzero.cloud account (skip this step if you have already done this)

subzero cloud create-config --id <id>
This will create a file called subzero-app.json in the root folder of your project.

Deploy

If you are managing your database schema in this project, make sure you have the database migrations folder ready for deploying it to your PostgreSQL instance (see Managing Migrations for details).

Now for the last part of the deployment do:

subzero cloud deploy
This will push the latest database migrations and reload the new database schema

If you are also using a customized openresty (you changed some files in the openresty directory), you'll need to provide an additional parameter:

subzero cloud deploy --openresty-image-tag <tag>
where <tag> is the docker image tag of the openresty image that will be built and pushed to production, for example, it can be v1

In a build script you could run the command like this

subzero cloud deploy --dba $PRODUCTION_DB_SUPER_USER --password $PRODUCTION_DB_SUPER_USER_PASSWORD --openresty-image-tag $CIRCLE_TAG

Done!