|
48 | 48 | </span></span><span class=line><span class=cl>-----END OPENSSH PRIVATE KEY----- |
49 | 49 | </span></span></code></pre></div></li><li><p>Encrypt the private key file by running the following command inside the <code>deployment</code> folder of the collection:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-shell data-lang=shell><span class=line><span class=cl>ansible-vault encrypt github-bot-private-key |
50 | 50 | </span></span></code></pre></div></li><li><p>Commit the changes to the repository</p></li><li><p>Add the public key to bot user’s GitHub account:</p><ul><li>Still logged in as the user account dedicated to bot-related actions in GitHub</li><li>Go to <a href=https://github.com/settings/ssh/new>https://github.com/settings/ssh/new</a></li><li>Add the public key with title “<collection_name> collection”</li></ul></li></ol><ol start=6 show-if-param-content data-param=ota data-value=true style=display:none><li show-if-param-content data-param=ota data-value=true style=display:none>Back up the key in the shared password database by creating an entry titled “OTA-Bot GitHub SSH key” in the collection folder and storing both public and private keys in this entry</li show-if-param-content data-param="ota" data-value="true" style="display: none;"></ol show-if-param-content data-param="ota" data-value="true" style="display: none;"><h2 id=7-configure-email-notifications><a class=title-link href=#7-configure-email-notifications>7. Configure email notifications |
51 | | -<i class="title-anchor icon" data-lucide=link></i></a></h2><p>This section describes how to configure the engine to use a specific SMTP server to send email notifications when it encounters errors during the tracking process. This helps you stay informed about issues that need attention and allows you to restart the tracking process if needed.</p><ol><li><p>Get the SMTP credentials (host, username, password) from your email provider</p></li><li><p>Update collection SMTP configuration within the <code>logger</code> key of <code>@opentermsarchive/engine</code> in the <code>config/production.json</code> file:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-json data-lang=json><span class=line><span class=cl> <span class=s2>"logger"</span><span class=err>:</span> <span class=p>{</span> |
| 51 | +<i class="title-anchor icon" data-lucide=link></i></a></h2><p>This section describes how to configure the engine to use a specific SMTP server to send email notifications when it encounters errors during the tracking process. This helps you stay informed about issues that need attention and allows you to restart the tracking process if needed.</p><ol><li><p>Get the SMTP credentials (host, port, username, password) from your email provider</p></li><li><p>Update collection SMTP configuration within the <code>logger</code> key of <code>@opentermsarchive/engine</code> in the <code>config/production.json</code> file:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-json data-lang=json><span class=line><span class=cl> <span class=s2>"logger"</span><span class=err>:</span> <span class=p>{</span> |
52 | 52 | </span></span><span class=line><span class=cl> <span class=nt>"smtp"</span><span class=p>:</span> <span class=p>{</span> |
53 | 53 | </span></span><span class=line><span class=cl> <span class=nt>"host"</span><span class=p>:</span> <span class=s2>"<smtp_host>"</span><span class=p>,</span> |
| 54 | +</span></span><span class=line><span class=cl> <span class=nt>"port"</span><span class=p>:</span> <span class=err><smtp_port></span><span class=p>,</span> |
54 | 55 | </span></span><span class=line><span class=cl> <span class=nt>"username"</span><span class=p>:</span> <span class=s2>"<smtp_username>"</span> |
55 | 56 | </span></span><span class=line><span class=cl> <span class=p>},</span> |
56 | 57 | </span></span><span class=line><span class=cl> <span class=p>}</span><span class=err>,</span> |
57 | | -</span></span></code></pre></div></li><li><p>Store the password in <code>deployment/.env</code>:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-shell data-lang=shell><span class=line><span class=cl><span class=nv>OTA_ENGINE_SMTP_PASSWORD</span><span class=o>=</span>your_smtp_key |
| 58 | +</span></span></code></pre></div><blockquote><p><strong>Note</strong>: If the default port (587) is blocked by your hosting provider, you can try using 2525 as an alternative.</p></blockquote></li><li><p>Store the password in <code>deployment/.env</code>:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-shell data-lang=shell><span class=line><span class=cl><span class=nv>OTA_ENGINE_SMTP_PASSWORD</span><span class=o>=</span>your_smtp_key |
58 | 59 | </span></span></code></pre></div><blockquote><p><strong>Note</strong>: To decrypt the file encrypted in a previous step in order to add the password, run <code>ansible-vault decrypt .env</code></p></blockquote></li><li><p>Encrypt the <code>.env</code> file:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-shell data-lang=shell><span class=line><span class=cl>ansible-vault encrypt .env |
59 | 60 | </span></span></code></pre></div></li></ol><ol start=5 show-if-param-content data-param=ota data-value=true style=display:none><li show-if-param-content data-param=ota data-value=true style=display:none>Create a new SMTP key in Brevo and name it “<collection_name> collection”</li show-if-param-content data-param="ota" data-value="true" style="display: none;"><li show-if-param-content data-param=ota data-value=true style=display:none>Back up the key in the shared password database by creating an entry titled “SMTP Key” in the collection folder and storing the credentials in this entry</li show-if-param-content data-param="ota" data-value="true" style="display: none;"></ol show-if-param-content data-param="ota" data-value="true" style="display: none;"><h2 id=8-test-the-deployment><a class=title-link href=#8-test-the-deployment>8. Test the deployment |
60 | 61 | <i class="title-anchor icon" data-lucide=link></i></a></h2><ol><li><p>Via GitHub Actions:</p><ul><li>Check that the <code>deploy</code> action completes successfully</li></ul></li><li><p>Via local deployment:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-shell data-lang=shell><span class=line><span class=cl><span class=nb>cd</span> <collection_id>-declarations/deployment |
|
0 commit comments