Deploy commands
Copy page
These commands deploy a project and show what it is doing.
grayspar deploy
Section titled “grayspar deploy”Build a folder and deploy it as a project.
grayspar deploy [flags] [folder]| Argument | Description |
|---|---|
folder |
Deploy only the files under this folder of the project (default: “.”). |
| Flag | Description |
|---|---|
-y, --yes |
Take the plan as shown without asking. |
--name <name> |
Create a new project with this name. |
--no-env |
Deploy without reading any .env file. |
--env-file <path> |
Read variables from a specific file. |
--env-conflict <winner> |
Which value wins where your .env differs from a saved one (choices: “saved”, “file”). |
-s, --service <name> |
Deploy only this service, repeatable. |
--path <name=path> |
Where a new service answers, repeatable. |
--no-path <name> |
A new service that takes no requests, like a background worker. |
--dockerfile <name=path> |
The Dockerfile a new service builds from. |
--volume <name=path> |
A folder a service keeps across deploys, repeatable. |
The first deploy creates the project and links the folder to it. Later deploys in that folder update the same project.
grayspar deploygrayspar deploy --yes --name <project-name>grayspar deploy --service webgrayspar deploy --path web=/ --path api=/api --no-path workergrayspar deploy --volume app=/app/datagrayspar status
Section titled “grayspar status”Show each service’s address and status.
grayspar status [flags]<project-name>
SERVICE URL STATUSapp https://<project-name>.grayspar.com Runninggrayspar logs
Section titled “grayspar logs”Show a service’s logs, or with –build its last build log.
grayspar logs [flags]| Flag | Description |
|---|---|
-s, --service <name> |
Which service to read. |
--build |
Show the log from the last build instead. |
-f |
Keep printing new lines as they arrive. |
grayspar logs --service api -fgrayspar logs --buildgrayspar restart
Section titled “grayspar restart”Start a fresh copy of a service’s running version.
grayspar restart [flags]| Flag | Description |
|---|---|
-s, --service <name> |
Which service to restart. |
grayspar restart --service apigrayspar link
Section titled “grayspar link”Link this folder to a project.
grayspar link [flags]Run this command in a folder that has no link, such as a second copy of the code. The link is saved in .grayspar/project.json.
grayspar unlink
Section titled “grayspar unlink”Unlink this folder from its project.
grayspar unlink [flags]The next grayspar deploy in that folder can create a new project. The project itself keeps running.