forked from openfoodfoundation/ofn-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.example.yml
191 lines (160 loc) · 7.55 KB
/
vars.example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#----------------------------------------------------------------------
# Variables to get your Open Food Network instance running
#
# Copy this file to vars.yml before filling out!
#
# This is a YAML file. Read more about YAML syntax at the official YAML site:
# http://www.yaml.org
#
# Note that YAML expects a space after the colon that follows a key (variable) name.
# For example, given the key "user", and the value "ubuntu" YAML expects the line
# to be written like this:
# user: ubuntu # note the space after the colon
#
# You can validate the syntax of your vars.yml file with the Online YAML Parser:
# http://yaml-online-parser.appspot.com
#----------------------------------------------------------------------
###########################################################################################
# IMPORTANT VARIABLES
# Modify these to suit your particular system and configuration.
# User name and password for running scripts
# user - the user (name) that will be used to run these playbooks as. Ex: vagrant Ex: ubuntu
# user_pass - password for 'user'
# We use 'vagrant' as the user for vagrant boxes and otherwise use 'ubuntu' as
# the user. 'ubuntu' is a common default user on systems where the user is
# already set up. (Be sure to replace the password with something strong!)
user: vagrant #ubuntu
user_pass: vagrant #ubuntu
# Connecting to the server
# ssh_pubkey - Location of the SSH public key file for the user created by
# running "ansible user.yml -f 10" The location given is the path on your
# local machine. Ex: "{{ lookup('file', '~/.ssh/ofn_rsa.pub') }}"
# The Ansible scripts will put it up onto the proper location on the OFN server.
# This might be used by hosts (like DigitalOcean) that require or encourage you
# to connect using SSH instead of just passwords.
ssh_pubkey: "{{ lookup('file', '~/.ssh/ofn_rsa.pub') }}"
# Language/Locale info
# country_code - iso standard country code, two uppercase letters. Ex: AU
# locale - locale code, e.g. 'en' or 'en-AU' (note dash not underscore)
# language - the i18n language and encoding. Ex: en_AU.UTF-8
# timezone - timezone name
# checkout_zone - as defined by Spree
# language_packages - the language pack(s) to download; should be a list of 1
# or more language packs. Used by apt. Ex: language-pack-en-base
# Set the language type for your locale
country_code: AU
locale: en
language: en_AU.UTF-8
timezone: London
checkout_zone: Europe
# Set the language pack to download
language_packages:
- language-pack-en-base
# OFN domain name
# domain - the domain name for the OFN system. Used by nginx. Ex: openfoodnetwork.co.uk
# Do not include "http://www." or "http://" or "https://" or "https://www" etc.
# Can be replaced with an IP address during development or testing.
domain: openfoodnetwork.xxx
# Secret Token
# This is required to verify session. It must me 30 characters and random. This
# must be changed for a production server.
# Generate one with a bash command like: openssl rand -hex 128
secret_token: '6d784d49173d0ec820f20cfce151717bd12570e9d261460e9d3c295b90c1fd81e3843eb1bec79d9e6d4a7f04d0fd76170ca0c326ffb0f2da5b7a0b50c7442a4c'
# Current Rails environment and protocol
# rails_env - Must be one of: production, staging, development, or testing.
# protocol - Must be either http or https
# Note that the production and staging environments REQUIRE that the protocol be
# set to https and that you have SSLcertificate files ('ssl.crt' and'ssl.key').
# Put these SSL certificate files in the /files directory so that the ansible
# scripts can find them and install them as necessary.
rails_env: development # production, staging, development or test.
protocol: http # http or https
# Git repository and tag to use
# git_repo - git repository URL to use Ex: https://github.com/openfoodfoundation/openfoodnetwork.git
# version - exactly which tag, branch, commit reference, or HEAD in the repository to use Ex: HEAD
git_repo: https://github.com/openfoodfoundation/openfoodnetwork.git
version: HEAD # Tag, branch, commit reference or HEAD
# Database password used by OFN
# db_pass - the db password used by OFN; this is put into the /config/database.yml file
# NOTE: You will want to set a new (different) db password in production and staging environments.
db_pass: f00d
# OFN users
# admin_email - the OFN admin user created by these scripts. Needed so you can log in to OFN to
# configure the system and enter information. Ex: admin@example.com
# admin_pass - the password for the OFN admin user created by these scripts. Ex: f00dies
admin_email: admin@example.com
admin_pass: f00dies
# OFN monitoring and instrumentation
# newrelic_key - the Newrelic key for application monitoring. Set to "none" to NOT use newrelic.
# bugsnag_key - the Bugnsag key for bug monitoring. Set to "none" to not use bugsnag.
newrelic_key: none
bugsnag_key: none
# Asset and content delivery
# Amazon S3 image hosting:
# s3_bucket - The bucket id. Set to none to NOT use s3
# s3_access_key_id - The access key. Set to none to NOT use s3
# s3_secret_access_key - The secret access key. Set to none to NOT use s3
s3_bucket: none
s3_access_key_id: none
s3_secret_access_key: none
##----------------------
## BACKUPS
# Paths
# local_backup_path - Place to store database backups on your local machine
# (where ansible runs) when running the backup task. Ex: /home/your_username/backups/{{ app }}
# local_rsync_path - Place to store rsynced files locally when running the
# backup task. Ex: /home/your_username/backups/{{ app }}
local_backup_path: /home/your_username/backups/{{ app }}
local_rsync_path: /home/your_username/backups/{{ app }}
###########################################################################################
# OTHER VARIABLES - You can probably go with the herd and leave these as is.
#----------------------------------------------------------------------
# Rails variables
ruby: 1.9.3-p392
gem_path: /home/{{ user }}/.gem
env:
RAILS_ENV: "{{ rails_env }}"
PATH: "{{ gem_home }}/bin:{{ ansible_env.PATH }}"
#phantomjs: phantomjs-1.9.0-linux-x86_64
#----------------------------------------------------------------------
# Database variables
db: openfoodnetwork
test_db: ofn_test
db_user: ofn_user
db_host: localhost
#----------------------------------------------------------------------
# App variables
app: openfoodnetwork
# Paths
home_path: "/home/{{ user }}"
app_path: "{{ home_path }}/apps/{{ app }}"
current_path: "{{ app_path }}/current"
repo_path: "{{ app_path }}/repo"
build_path: "{{ app_path }}/build"
shared_path: "{{ app_path }}/shared"
backup_path: "{{ app_path }}/backups"
releases_path: "{{ app_path }}/releases-old"
rollback_path: "{{ app_path }}/rollback"
rollback_sql_path: "{{ app_path }}/rollback.sql.gz"
assets_path: "{{ shared_path }}/assets"
system_path: "{{ shared_path }}/system"
spree_path: "{{ shared_path }}/spree"
config_path: "{{ shared_path }}/config"
log_path: "{{ shared_path }}/log"
pid_path: "{{ shared_path }}/pids"
sock_path: "{{ shared_path }}/sock"
git_post_receive: "{{ current_path }}/.git/hooks/post-receive"
#----------------------------------------------------------------------
# Nginx variables
app_root: "{{ current_path }}"
port: 3000
# domain: is set above
#----------------------------------------------------------------------
# Unicorn variables
unicorn_user: "{{ user }}"
unicorn_config: "{{ config_path }}/unicorn.rb"
unicorn_log: "{{ log_path }}/unicorn.log"
unicorn_pid: "{{ pid_path }}/unicorn.pid"
unicorn_sock: "{{ sock_path }}/unicorn.{{ app }}.sock"
unicorn_workers: 2
unicorn_timeout: 30