Skip to content

Instantly share code, notes, and snippets.

@lifeisfoo
Last active November 20, 2016 16:37
Show Gist options
  • Save lifeisfoo/0f888d989fb8b5fd8171ffe4fda385e3 to your computer and use it in GitHub Desktop.
Save lifeisfoo/0f888d989fb8b5fd8171ffe4fda385e3 to your computer and use it in GitHub Desktop.
dockerc-cloud cli common operations
# dcs = docker-cloud service, see https://github.com/lifeisfoo/docker-cloud-aliases
dcs create -n service-name -t 1 image-name:tag
dcs start service-name # or UUID
dcs env ls b239 # show environment variables for a service
dcs set --link-service mongo:mongo b239 # link another service to this
dcs env add -e DATABASE_HOST=mongo b239 # add a variable to the env
dcs env add -e DATABASE_PORT=27017 b239 # add another variable
dcs env update -e "CRON_SCHEDULE=0 */2 * * *" 485551e3 # update an existing env var
# WARN:this will overwrite all user defined env vars, prefer "env update" o rm+add
dcs env set -e asd=www 485551e3
dcs env set -e "CRON_SCHEDULE=* */2 * * *" -e asd=www 485551e3 # define multiple env vars
dcs env set --env-file env_vars.txt 485551e3 # to set all env vars from the file - se below
dcs redeploy b239 # redeploy the service to see changes
# example env vars file
CRON_SCHEDULE=* */2 * * *
MONGO_HOST=mongo
MONGO_PORT=27017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment