Skip to content

Commit f1dfa44

Browse files
authored
Merge pull request #276 from membermatters/main
update dev
2 parents 162b474 + 251e4fe commit f1dfa44

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

docs/POST_INSTALL_STEPS.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
11
# Post Installation Steps
2-
Once you have completed the [getting started](/docs/GETTING_STARTED.md) instructions, you should complete the following steps to setup and customise your instance of MemberMatters.
2+
Once you have completed the [Getting Started](/docs/GETTING_STARTED.md) instructions, you should complete the following steps to setup and customise your instance of MemberMatters.
33

4-
## Important Notice
5-
Currently, a valid Postmark API key is required for MemberMatters to function correctly. Emails are sent on various tasks like sign ups, MemberBucks actions etc. You will receive errors if you try to use these functions without a correctly configured Postmark API key. They have a free trial (100 emails/mth) which should be more than enough for testing, however we recommend upgrading to a paid tier before use in production.
4+
## Postmark
5+
The first step is to set up a [Postmark](https://www.postmarkapp.com) account to enable the sending of emails. Postmark has a free trial (100 emails/mth) which should be more than enough for testing, however we recommend upgrading to a paid tier before use in production.
6+
7+
Currently, a valid Postmark API token is required for MemberMatters to function correctly. Emails are sent on various tasks like sign ups, MemberBucks actions etc. You will receive errors if you try to use these functions without a correctly configured Postmark API key.
8+
9+
Initially when Postmark account is created in "test mode" you can only send emails to the same domain as your Member Matters domain. This domain limitation may create problems if your test account emails use a different domain. You can add the ability to send from a specific domain to an arbitrary domains by adding a domain "sender signature" in the Postmark account. Errors in Member Matters caused by Postmark misconfiguration can present themselves as "Sorry, we're having trouble performing that action. Please try again later." or other ambiguous messages. Check the [Django logs](#logs) for more details on the cause of an error.
10+
11+
Aftert creating the [Postmark](https://www.postmarkapp.com) account see the section [Postmark (Email) Integration](#postmark-email-integration) to set the Postmark "Server API token" in the Member Matters configuration.
12+
13+
## Logs
14+
The default settings for the Django logs are configured in the Docker *container* in the file /usr/src/app/memberportal/membermatters/settings.py (if you installed as suggested by the [Getting Started](/docs/GETTING_STARTED.md) instructions). The distributed settings.py places the logs in /usr/src/logs/django.log. If you run into problems these logs are a good first place to look.
15+
16+
Logs are also available via the command `docker logs membermatters` from the Docker *host*.
617

718
## Set up a reverse proxy
819
MemberMatters is designed to run behind some form of reverse proxy, or at the minimum, an SSL terminating CDN like Cloudflare (not recommended). You *should not ever* run MemberMatters in production without some form of HTTPS. The recommended way is with an nginx reverse proxy as explained below. Unfortunately, reverse proxy configurations are highly dependant on your specific environment, so only general guidance can be given. Please consult your favourite search engine if you have any trouble and only open a GitHub issue if you think you've found a bug or way to improve this documentation.
920

1021
### Setting up an nginx reverse proxy on Ubuntu
22+
Note that the any updated DNS records for your server will need to have propagated prior to certificate being issued.
23+
From your Docker *host* command line do the following:
1124
1. You should first install nginx. On Ubuntu, you can install nginx with `sudo apt install nginx`.
1225
2. Configure your nginx instance to proxy traffic through to the MemberMatters docker container on port `8000`.
13-
3. A sample configuration file is included below, but you should configure this to your needs. You should create this file at `/etc/nginx/sites-available/example.com`, where `example.com` is the name of our domain.
26+
3. A sample configuration file is included below, but you should configure this to your needs. You should create this file at `/etc/nginx/sites-available/portal.example.com`, where `portal.example.com` is the name of our domain.
1427
```
1528
server {
1629
server_name example.com;
1730
1831
location / {
1932
proxy_set_header Host $host;
20-
proxy_set_header X-Real-IP $remote_addr;
21-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22-
proxy_set_header X-Forwarded-Proto $scheme;
23-
proxy_set_header X-Forwarded-Host $host;
24-
proxy_set_header X-Forwarded-Port $server_port;
25-
proxy_set_header Upgrade $http_upgrade;
26-
proxy_set_header Connection "upgrade";
33+
proxy_set_header X-Real-IP $remote_addr;
34+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
35+
proxy_set_header X-Forwarded-Proto $scheme;
36+
proxy_set_header X-Forwarded-Host $host;
37+
proxy_set_header X-Forwarded-Port $server_port;
38+
proxy_set_header Upgrade $http_upgrade;
39+
proxy_set_header Connection "upgrade";
2740
2841
proxy_redirect off;
2942
proxy_pass http://localhost:8000;
@@ -32,11 +45,13 @@ server {
3245
listen [::]:80 default_server;
3346
}
3447
```
35-
4. Enable your new configuration file by running this command `sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/`.
36-
5. Check the configuration that you added is valid by running this command, there should be no errors: `sudo nginx -t`.
37-
6. Restart nginx to apply your new changes with `sudo systemctl restart nginx`.
38-
7. Note that this process does not include a configuration for HTTPS. We recommend that you use the Let's Encrypt Certbot tool as it will automatically modify your configuration to enable HTTPS and manage certificates for you. [Click here](https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx) and follow the instructions to install certbot on your system. Once installed, run certbot as per that link and follow the prompts to enable HTTPS for your system.
39-
8. Check that you can access your instance of MemberMatters via HTTPS at the URL that you configured.
48+
4. Disable the default configuration: `sudo rm /etc/nginx/sites-enabled/default`.
49+
5. Enable your new configuration file by running this command `sudo ln -s /etc/nginx/sites-available/portal.example.com /etc/nginx/sites-enabled/`.
50+
6. Check the configuration that you added is valid by running this command, there should be no errors: `sudo nginx -t`.
51+
7. Restart nginx to apply your new changes with `sudo systemctl restart nginx`.
52+
8. Configure your firewall to allow Nginx. For servers running UFW - Uncomplicated Firewall, the following command will work after Nginx is installed: `sudo ufw allow "Nginx Full"`
53+
9. Note that this process does not include a configuration for HTTPS. We recommend that you use the Let's Encrypt Certbot tool as it will automatically modify your configuration to enable HTTPS and manage certificates for you. [Click here](https://certbot.eff.org/instructions) Select "Nginx" and your OS and then follow the instructions to install certbot on your system. Once installed, run certbot as per that link and follow the prompts to enable HTTPS for your system.
54+
10. Check that you can access your instance of MemberMatters via HTTPS at the URL that you configured.
4055

4156
## Customisation
4257
The primary way to customise MemberMatters is via the database settings. Once your instance is up and running,
@@ -84,7 +99,7 @@ However, as noted below, currencies will use a hardcoded value set by a configur
8499
* "CANVAS_API_TOKEN" - the API token for the Canvas LMS integration.
85100

86101
### Postmark (Email) Integration
87-
* "POSTMARK_API_KEY" - the API token for the Postmark integration. NOTE: required for basic MemberMatters functionality.
102+
* "POSTMARK_API_KEY" - the "Server API token" from your [Postmark](#postmark) account. NOTE: required for basic MemberMatters functionality.
88103

89104
### Twilio (SMS) Integration
90105
* `SMS_ENABLE` - Enables sending of SMS messages on some events. See below for a current list of events.

0 commit comments

Comments
 (0)