Getting started
Prerequisites
Required software
- Node.js v18 or greater on Mac, Linux or Windows.
- Docker CLI with the default Docker Compose and BuildX plug ins. The Docker CLI is included with the Docker Engine installation and can also be installed separately.
- To use Kubernetes as a deploy runtime: kubectl.
Your Docker Compose app
If you don't have an existing Docker Compose app, check out Awesome Compose - a curated list of Compose samples, from React to Minecraft.
Your cloud provider or Kubernetes cluster
Preevy deploys your app to one of the supported deploy runtimes.
Choose the cloud provider or Kubernetes cluster you're going to use and configure access credentials for it:
- For AWS: use
aws configure
. See AWS lightsail credentials configurations. - For GCP: use
gcloud auth application-default login
. See GCP credentials configuration - For Azure: use
az login
. See Azure credentials configuration - For Kubernetes: See Kubernetes credentials configuration
Note Preevy only uses your credentials when you run the Preevy CLI to set up and connect to your environments. Your credentials are not sent or stored anywhere outside of your computer.
Local Kubernetes server using Docker Desktop
If you don't have an existing cloud account or prefer to try Preevy first locally, you can use the Docker Desktop Kubernetes server. Go to: Docker Settings
-> Kubernetes
-> Enable Kubernetes
.
Install the Preevy CLI
npm install -g preevy
Or use npx
to run the CLI without installing it:
npx preevy <command>
Set up a profile
preevy init
Preevy will ask you to select a deploy target and a storage location for your profile. You can start by storing the profile locally.
Deploy your first environment
From the same directory where your docker-compose.yml
or compose.yml
file is located, run the command below:
preevy up
Note: Preevy uses the git repo at the current directory to calculate a stable environment ID for your project. Make sure a git repo is initialized (with at least one commit), or add the --id
flag to explicitly specify the environment ID.
Access and share your new preview environment at the *.livecycle.run
links provided in the command output.
Update your environment
Code changed? Re-run preevy up
to quickly sync the preview environment with your changes on the existing VM or Kubernetes Pod.
List and remove your environment
Run preevy ls
to show all environments in your deploy target which are linked to your profile.
Run preevy down
to remove your environment. Preevy will delete the VM or Kubernetes Pod.
FAQ
See the CLI FAQ section.
What's next?
- Check out our Docker Extension, which uses Preevy to share Compose apps running on your local computer!
- See the full CLI reference
- Integrate Preevy into your CI workflows