dominicsayers/foreplay

View on GitHub
lib/foreplay/setup/foreplay.template.yml

Summary

Maintainability
Test Coverage
# Format:
#
# There is a section for each environment that you will deploy to, plus a section that defines global default
# values for all environments, like this:
#
# defaults:
#   ...
# production:
#   ...
# staging:
#   ...
#
# Within each section you can define the server roles for that environment: web, worker, database etc. (the
# names of these roles are up to you). You can also define environment-level defaults that apply to all roles.
# Like this:
#
# production:
#   defaults:
#     ...
#   web:
#     ...
#   worker:
#     ...
#   scheduler:
#     ...
#   database:
#     ...
# staging:
#   defaults:
#     ...
#   web:
#     ...
#   worker:
#     ...
#   scheduler:
#     ...
#   database:
#     ...
#
# Within each role section you can define how the deployment is configured for the servers in that role.
# Some of these values will normally be defined as a default, some will be specific to a particular role.
# The values you can configure are as follows:
#
# value         Normally defined as  Notes
# ------------- -------------------- -------------------------------------------------------------------
# name:         Global default       App name (if omitted then current folder name is used)
# user:         Global default       The username to connect with (must have SSH permissions)
# password:     Global default       The password to use to connect (not necessary if you've set up SSH
#                                    keys - see below)
# keyfile:      Global default       A file containing a private key that allows the named user access
#                                    to the server, or...
# key:          Global default       A private key that allows the named user access to the server
# path:         Global default       An absolute path to deploy the app on each server. %a will be
#                                    translated to the application name. %u will be translated to the
#                                    login user name
# port:         Global default       The base port for the web app to listen on. Port 80 will be
#                                    mapped to this port so it's usually OK to leave this at the
#                                    default value of 50000.
# database:     Environment default  The database.yml elements to write to the config folder
#   key: value
# servers: [server1, server2, server3]
#               Role level           Which servers to deploy the app on
# env:          Role level           Contents of the .env file
#   key: value                       Values will go into the .env file as key=value
# foreman:      Role level           Contents of the .foreman file
#   key: value
# resque:       Role level           Contents of the resque.yml file for configuring a central redis
#                                    server for an environment, e.g. production: redis://mydom.com:6379
#
defaults:
  name: <%= @options.name? ? @options.name : 'TODO Put the app name here' %>
  repository: <%= @options.repository? ? @options.repository : 'TODO Put the git repository path here' %>
  user: <%= @options.user? ? @options.user : 'TODO Put here the user to logon to the deployment server' %><%= @options.password? ? "\n  password: #{@options.password}" : '' %><%= @options.keyfile? ? "\n  keyfile: #{@options.keyfile}" : '' %><%= @options.private_key? ? "\n  private_key: #{@options.private_key}" : '' %><%= !@options.password? && !@options.private_key? && !@options.keyfile? ? "\n  password: TODO Supply a password or private key to connect to the server" : '' %>
  path: <%= @options.path? ? @options.path : 'TODO Put here the path to deploy to on the deployment server' %>
  port: <%= @options.port %>
production:
  defaults:<%= @options.resque_redis? ? "\n    resque: #{@options.resque_redis}" : '' %>
    database:
      adapter: <%= @options.db_adapter %>
      encoding: <%= @options.db_encoding %>
      database: <%= @options.db_name? ? @options.db_name : 'TODO Put the database name here' %>
      pool: <%= @options.db_pool %>
      host: <%= @options.db_host? ? @options.db_host : 'TODO Put here the database host name' %>
      username: <%= @options.db_user? ? @options.db_user : 'TODO Put here the database user' %>
      password: <%= @options.db_password? ? @options.db_password : 'TODO Put here the database user\'s password' %>
  web:
    servers: <%= @options.servers? ? @options.servers : '[TODO Put here the name or names of the production web servers]' %>
    foreman:
      concurrency: 'web=1,worker=0,scheduler=0'