###############################################################################
#                                   Propel
#
# A deploy config file to deploy Mambo apps
#
# Go to `https://github.com/mardix/propel` for more info and config options
#
# How to run?
#
# After `pip install propel` on the production server, you can run the following
# commands:
#
#   'propel -w' on the hosting server to launch a web application
#   'propel -k $worker-name' on the hosting server to launch a worker application by name
#   'propel -s $script-name' on the hosting server to execute a script by name
#
###############################################################################


# Virtualenv
virtualenv:
  name: ""  # Required - The name of the virtual environment

# WEB: list of dict of web sites/application to deploy
web:
  -
    name: ""  # Required - The site name
    application: "serve:app"
    environment: app="{project_name}:production"

    # Nginx related config
    nginx:
      aliases:
        "/static": "application/{project_name}/static"
        "/uploads": "application/_data/uploads"

# SCRIPTS: A dict of all scripts to execute
scripts:

  # Scripts to before anything else
  before_all:
    -
      command: "mambo setup"
      environment: app="{project_name}:production"


  # Scripts to run when undeploying
  undeploy:
    - command: ""

# WORKERS: Run custom script or app in the background using supervisor
workers:

  # Tasks:
  tasks:
    -
      name: "worker-task-1"
      command: "" # mambo cmd
      environment: app="{project_name}:production"

### END OF PROPEL


################################################################################
# Mambo specific config
# ------------------------------------------------------------------------------
# From command line
# - mambo deploy
#
# contain a k/v store of remote/hosts to push application to
# Require local git and remote git for push to work
deploy-remotes:
  # remote name containing list of git hosts
  # > mambo deploy -r web
  web:
    - ssh://user@host:/path.git



