Search…
Velocity config (.velocity.yaml)
Use a configuration file to simplify using the veloctl CLI
​To simplify working with the veloctl ​command, you can define command shortcuts and keep them in .velocity.yaml configuration file.
This file can be saved in your git repository and shared among all team members.
In this file, you can keep a list of services and specify default parameters for running env develop or env sync commands. These parameters will be detected and used when a command is triggered from the command line.
This is the basic structure of .velocity.yaml configuration file:
---
version: '1'
services:
backend:
develop:
// ... Specify the default values when running develop for service 'backend'
sync:
// ... Specify the default values when running sync for service 'backend'
website:
develop:
// ... Specify the default values when running develop for service 'website'
sync:
// ... Specify the default values when running sync for service 'website'
The file can be used in two ways:
  1. 1.
    Implicitly: When running env develop or env sync without the command parameter from a location that contains the configuration file, the file will automatically be detected and used. For example:
    veloctl env develop --service website
  2. 2.
    Explicitly: By passing the file path as an argument. For example:
    veloctl env develop --service website --file my.velocity.yaml

Velocity Configuration for 'env develop'

The parameters you can specify for env develop are:
  • command: The local command you need to run when developing the service
  • environment: The environment variables you want to set locally when developing the service
---
version: '1'
services:
backend:
develop:
command: docker run -e RAILS_ENV=development --rm -v `pwd`:/usr/src/app -t backend_web sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p \$PORT -b '0.0.0.0'"
environment:
DEBUG: 1
VAR2: 'hello'
lowercase: 'value'
website:
develop:
command: yarn start
environment:
PORT: 3003

Velocity Configuration for 'env sync'

For env sync you can specify all the available command parameters using the following file syntax.
For more information about env sync parameters, you can follow the CLI Reference.
version: 1
services:
gcp-service:
develop:
command: sh -c printenv
environment:
VAR1: 1
VAR2: "hello"
sync:
source: /dev/vironcorp/gcp-service
exclude_patterns:
- \/*.go
- \/*.md
- ./configStuff
dockerfile: /dev/vironcorp/gcp-service/Dockerfile
build_dir: .
live_updates:
- /dev/vironcorp/gcp-service/cmd/:root/gcp-service/cmd/
skip_first_build: true
no_watch: true
build_script: /dev/vironcorp/gcp-service/build.sh
build_tag_var: CONFIG_TAG
Copy link
On this page
Velocity Configuration for 'env develop'
Velocity Configuration for 'env sync'