Skip to content

Commit 0b6cf8a

Browse files
committed
Reorganize config documentation
1 parent 3988186 commit 0b6cf8a

File tree

1 file changed

+53
-42
lines changed

1 file changed

+53
-42
lines changed

docs/configuration.md

Lines changed: 53 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ The domains/subdomains to use for your project. By default your project is acces
5252

5353
## Optional config
5454

55-
#### mix_env
55+
##### mix_env
5656

5757
The `MIX_ENV` to use when running the app. Default is `prod`.
5858

59-
#### git_ref
59+
##### git_ref
6060

6161
Git ref of the project to deploy. This can be a branch (*recommended*) or tag or commit you want to deploy. Defaults to `master` branch.
6262

6363
* Default: `master`
6464
* Examples: `74e09b4fe3fca`, `stable`, `v3.4.1`
6565

6666

67-
#### deploy_type
67+
##### deploy_type
6868

6969
> **NOTE:** Read the documentation on [Hot code-reloading](hot-code-reloading.md) for whys & hows of this variable.
7070
@@ -75,24 +75,33 @@ By default, on each deploy your app will be restarted. Setting it to `upgrade` w
7575

7676
You can switch between restarts and upgrades anytime.
7777

78-
#### deployer
78+
##### secret_key_base_length
79+
80+
Length of the secret key base. Can be set to any integer.
81+
82+
* Default: `64`
83+
84+
##### deployer
7985

8086
The name of the user to create to run all your projects. Default is `deployer`.
8187

82-
#### projects_dir
88+
##### projects_dir
8389

8490
The dir where all your projects will be stored. This is relative to the $HOME of the deployer user.
8591

8692
* Default: `projects`
8793

88-
#### setup_postgres
94+
##### setup_postgres
8995

9096
If you app doesn't require postgres, set this option to `False`.
9197

9298
* Default: `True`
9399
* Possible values: `True`, `False`
94100

95-
#### build_frontend
101+
102+
### Frontend build configuration
103+
104+
##### build_frontend
96105

97106
If the app does not require building frontends, set this this to `False`.
98107

@@ -106,7 +115,7 @@ The directory where the `package.json` file resides. For a Phoenix app by defaul
106115
* Default: `""` (an empty string)
107116

108117

109-
#### frontend_build_command
118+
##### frontend_build_command
110119

111120
The command to use to build the frontend.
112121

@@ -122,63 +131,43 @@ Command that should be run after the frontend build has completed. This is run i
122131

123132
* Default: `mix phoenix.digest`
124133

125-
#### app_alert_emails
126-
127-
List of email addresses to alert if the app goes down. No emails are sent by default.
128-
129-
* Default: `[]`
130-
* Example values:
131-
132-
133-
134-
135-
#### nginx_alert_emails
136-
137-
List of email addresses to alert if nginx goes down. No emails are sent by default.
138-
139-
* Default: `[]`
140-
* Example values:
141-
142-
143-
144-
> NOTE: `nginx_alert_emails` is common for the entire server. So if you set it in one app, maintain the same values in all your apps. Please create an issue if you can think of a better solution.
134+
### Swap file configuration
145135

146-
#### create_swap_file
136+
##### create_swap_file
147137

148138
Creates a swap if this is set to `True`.
149139

150140
* Default: `True`
151141
* Possible values: `True`, `False`
152142

153-
#### swap_size
143+
##### swap_size
154144

155145
If `create_swap_file` is set to `True`, this option can be used to specify the size of the swap to create. by default the size is 2gb. If you aren't sure leave this unchanged.
156146

157147
* Default: `2097K`
158148
* Possible values: calculated as `1024 * 1024 * n`. So for 4gb that would be 4194304, which can be specified as `4194K`
159149

160150

161-
#### npm_config_jobs
151+
### NPM configuration
152+
153+
##### npm_config_jobs
162154

163155
Set this to more than `1` if npm should be allowed to be run in parallel. For 512mb RAM servers, it's better to set this to `1`.
164156

165157
* Default: `1`
166158
* Example values: `2`, `5`
167159

168-
#### npm_config_install_production
160+
##### npm_config_install_production
169161

170162
If set to `True`, npm dependencies will be installed with `npm install --production`. Else it is just `npm install`.
171163

172164
* Default: `False`
173165
* Possible values: `True`, `False`
174166

175-
#### secret_key_base_length
176-
177-
Length of the secret key base. Can be set to any integer.
178167

179-
* Default: `64`
168+
### Monitoring email alerts
180169

181-
#### enable_mail_alerts
170+
##### enable_mail_alerts
182171

183172
Will send mail alerts when stuff goes down. If this is enabled, SMTP configuration needs to be provided.
184173

@@ -187,29 +176,51 @@ Will send mail alerts when stuff goes down. If this is enabled, SMTP configurati
187176

188177
You could use GMail, [MailGun](http://mailgun.com), [Amazon SES](http://aws.amazon.com/ses/), [SendGrid](https://sendgrid.com) or anything else. Most providers have a free quota that should be sufficient for your hobby apps.
189178

190-
#### smtp_host
179+
##### app_alert_emails
180+
181+
List of email addresses to alert if the app goes down. No emails are sent by default.
182+
183+
* Default: `[]`
184+
* Example values:
185+
186+
187+
188+
189+
##### nginx_alert_emails
190+
191+
List of email addresses to alert if nginx goes down. No emails are sent by default.
192+
193+
* Default: `[]`
194+
* Example values:
195+
196+
197+
198+
> NOTE: `nginx_alert_emails` is common for the entire server. So if you set it in one app, maintain the same values in all your apps. Please create an issue if you can think of a better solution.
199+
200+
201+
##### smtp_host
191202

192203
Set this to your SMTP host.
193204

194205
Example values: `smtp.gmail.com`, `smtp.mailgun.org`
195206

196-
#### smtp_port
207+
##### smtp_port
197208

198209
Set this to your host's SMTP port. For most servers, the default would work.
199210

200211
* Default: `587`
201212

202-
#### smtp_user
213+
##### smtp_user
203214

204215
Email address you want to send mails from.
205216

206217
* Example values: `[email protected]`, `[email protected]`
207218

208-
#### smtp_password
219+
##### smtp_password
209220

210221
Password for the SMTP user account.
211222

212-
#### smtp_use_tls
223+
##### smtp_use_tls
213224

214225
Does your SMTP host use TLS? As a reference, set this to `True` for GMail & `False` for [MailGun](http://mailgun.com).
215226

0 commit comments

Comments
 (0)