Deploy to Writer Cloud
Basic usage
The writer cloud
command group includes the following commands:
deploy
undeploy
logs
Common options
These options are common across multiple commands:
--api-key
: The Writer API key used for authentication. If not provided, you will be prompted to enter it.--verbose, -v
: Enable verbose output.
Commands
Environment variables
When deploying an app, you can specify environment variables that will be available to the app during runtime. Use the --env
option to pass these variables.
In this example, DB_HOST
and DB_PORT
will be available to the app as environment variables.
API key
The WRITER_API_KEY
is crucial for deploying and managing apps. It is used for authenticating requests to the Writer cloud. If not provided as an option, the CLI will prompt you to enter it. The WRITER_API_KEY
will also be added to the deployed app’s environment to enable AI features of the Writer framework.
Deployment process
Package Creation
The CLI packages the app, excluding certain files (e.g., Dockerfile, service_entrypoint.py
).
Upload Package
The package is uploaded to the Writer deployment server.
Build and Deploy
The server builds and deploys the app, making it accessible via a URL.
Environment Variables
Specified environment variables are set, and WRITER_API_KEY
is added by default.
Example workflow
Deploying an App
Fetching Logs
Undeploying an App
By following this documentation, you should be able to effectively deploy and manage your Writer apps using the Writer Framework CLI.