Getting Started

Deploy your first app on Drift in under 5 minutes.

Prerequisites#

  • A Docker image of your application (or source code with a Dockerfile)
  • Drift CLI installed (see below)

Step 1: Install the CLI#

# Download the latest binary
curl -fsSL https://drift.velozengineering.ch/install.sh | bash

# Or build from source
git clone https://gitlab.com/velozengineering/swarm-cf-bridge.git
cd swarm-cf-bridge
make build
cp bin/drift /usr/local/bin/

Verify the installation:

drift version
# drift v1.0.0 (commit: abc1234, built: 2024-01-15)

Step 2: Login#

drift login -a https://api.drift.velozengineering.ch -e [email protected] -p yourpassword

Interactive login

You can also run drift login without flags and provide the API endpoint, email, and password interactively.

Step 3: Create your organization#

# Create an org
drift create-org mycompany

# Target it
drift target -o mycompany

# Create a space
drift create-space dev

# Target both org and space
drift target -o mycompany -s dev

Organizations are the top-level container for your team. Spaces let you separate environments (dev, staging, production).

Step 4: Push your first app#

drift push myapp --docker-image myregistry/myapp:latest

# Your app is now running!
drift apps
# NAME    STATE    INSTANCES  MEMORY
# myapp   STARTED  1          256M

Manifest support

You can also create a manifest.yml file to define your app configuration, routes, environment variables, and service bindings. The CLI will automatically detect it.

Step 5: Bind a service#

# Browse the marketplace
drift marketplace
# SERVICE     PLANS              DESCRIPTION
# postgres    small, medium...   PostgreSQL 16 database
# redis       small, medium...   Redis 7 in-memory store
# ...

# Create a service instance
drift create-service postgres small mydb

# Bind it to your app
drift bind-service myapp mydb

# Restart to pick up the new credentials
drift restart myapp

After binding, your app receives database credentials via the VCAP_SERVICES environment variable — the same format used by Cloud Foundry.

Step 6: Access your app#

# SSH into your running container
drift ssh myapp
# You're now inside the container!

# View logs
drift logs myapp -f

# Check environment variables
drift env myapp

Next steps#