Line 448:
Line 448:
*with authentication (username and password)
*with authentication (username and password)
−
====First choice : in house mail server like Postfix====
+
<br />
−
'''''Cheapest but tricky to set/configure and monitoring email reputation is required.'''''
+
{| class="wikitable"
+
|+Comparison of two possible configurations
+
!In house mail server like [http://www.postfix.org/ Postfix]
+
!External email service like [https://www.mailgun.com/ Mailgun]
+
|-
+
|
+
* '''''Cheapest'''''
+
* '''''Tricky to set/configure'''''
+
* '''''Monitoring email reputation is required'''''
+
|
+
* '''''Affordable'''''
+
* '''''Simple and easy (no configuration)'''''
+
* '''''Email reputation is managed by the provider'''''
+
|-
+
|
+
* Install [http://www.postfix.org/ Postfix] mailserver
−
*Install Postfix mailserver
*Configure / allow / unblock port 587 for outgoing email sending by postfix in the firewall (IP table, etc.)
*Configure / allow / unblock port 587 for outgoing email sending by postfix in the firewall (IP table, etc.)
*Configure Postfix to require authentication : see https://blog.rom1v.com/2010/01/ajouter-lauthentification-smtp-sur-un-serveur-mail/
*Configure Postfix to require authentication : see https://blog.rom1v.com/2010/01/ajouter-lauthentification-smtp-sur-un-serveur-mail/
+
|
+
* [https://www.mailgun.com/ Mailgun] pricing, [https://www.mailgun.com/pricing first 10 000 emails every month free (+5$ by 10 000 email)]
+
* [https://fr.mailjet.com/ Mailjet] pricing, [https://fr.mailjet.com/pricing/ first 6 000 monthly emails free (no more than 200 email per day ; 30 000 per month for 7,16€])
+
* [https://aws.amazon.com/fr/ses/ AWS SES (Amazon Web Services Simple Email Service)] pricing, [https://aws.amazon.com/fr/ses/pricing/ 0.10$ per 1 000 emails].
+
|}
−
====Second choice : external email service like [https://www.mailgun.com/ Mailgun]====
+
== Tips and tricks ==
−
'''''Affordable, simple and easy (no configuration)'''''
−
*For [https://www.mailgun.com/ Mailgun], [https://www.mailgun.com/pricing first 10 000 emails every month free (+5$ by 10 000 email)]
+
===Docker tips and tricks===
−
−
−
==Docker tips and tricks==
The main and recommended way to Install Discourse is using Docker containers system (it contains everything required to run Discourse : Ruby, Sidekiq, Redis, PostgreSQL with the appropriate version and does not mess with the host data).
The main and recommended way to Install Discourse is using Docker containers system (it contains everything required to run Discourse : Ruby, Sidekiq, Redis, PostgreSQL with the appropriate version and does not mess with the host data).
Line 474:
Line 489:
−
==PostgreSQL tips and tricks==
+
===PostgreSQL tips and tricks===
−
===Allow PostgreSQL to be accessed from an external application===
+
====Allow PostgreSQL to be accessed from an external application====
''Useful to be able to access the database from a graphical client (like pgAdmin 4, TablePlus or Postico for example).''
''Useful to be able to access the database from a graphical client (like pgAdmin 4, TablePlus or Postico for example).''
Line 503:
Line 518:
Refer to [https://tableplus.io/blog/2018/04/postgresql-how-to-grant-access-to-users.html PostgreSQL - How to grant access to users?] for more info.
Refer to [https://tableplus.io/blog/2018/04/postgresql-how-to-grant-access-to-users.html PostgreSQL - How to grant access to users?] for more info.
−
===Dumping database===
+
====Dumping database====
−
====Use <code>pg_dump</code> to dump the database====
+
=====Using <code>pg_dump</code> to dump the database=====
Below syntax assume that a custom pgsql account has been created prior to running the command and that port 5432 of PostgreSQL is correctly forwarded from the container to the host (following [[#Allow PostgreSQL to be accessed from an external application]] section instructions).
Below syntax assume that a custom pgsql account has been created prior to running the command and that port 5432 of PostgreSQL is correctly forwarded from the container to the host (following [[#Allow PostgreSQL to be accessed from an external application]] section instructions).
Line 515:
Line 530:
</syntaxhighlight>
</syntaxhighlight>
−
====Use discourse internal backup tool====
+
=====Using discourse internal backup tool=====
It is also possible to use Discourse internal backup tool to grab a backup (database + users uploads) of the Discourse instance.
It is also possible to use Discourse internal backup tool to grab a backup (database + users uploads) of the Discourse instance.
Just go to <code>Admin → Backup</code>
Just go to <code>Admin → Backup</code>