Skip to content

Commit b0b961a

Browse files
authored
Update macos.md (#30)
* Update macos.md I basically stole the template from Ubuntu installation page and modified some dependencies as I find it mostly the same process except to install some extra libs. I've tested using my own Mac and it was running perfectly. Let me know the parts to fix, if any. Signed-off-by: Jahseh J. <[email protected]> * Correct for PR change requests * Correct typos & missing info --------- Signed-off-by: Jahseh J. <[email protected]>
1 parent ce83849 commit b0b961a

File tree

1 file changed

+69
-5
lines changed

1 file changed

+69
-5
lines changed
Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,75 @@
11
---
2-
description: Deploy Modmail on a MacOS machine.
2+
description: Deploy Modmail on a macOS machine. (Tested with Apple Silicon M2)
33
---
44

5-
# MacOS
6-
7-
TODO
5+
# macOS
86

97
## Prerequisites
108

11-
## Updating
9+
1. Minimum 2GB of RAM
10+
2. At least 2GB available disk space.
11+
3. Supported macOS version:
12+
- MacOS 14 Sonoma (Tested)
13+
- MacOS 11 Monterey (Tested)
14+
15+
## Dependencies
16+
17+
We will be using the following dependencies:
18+
19+
* Python 3.10
20+
* Tools: `git`, `homebrew`, `bash` or `zsh`
21+
* Additional Modmail requirements: `cairo`, `libxml2`, `libxslt`, `libffi`
22+
23+
{% hint style="info" %}
24+
All code blocks should be executed in zsh or bash and line by line unless specified otherwise.
25+
{% endhint %}
26+
27+
To install these dependencies, we will be using Terminal (zsh or bash):
28+
29+
```bash
30+
brew install python3 cairo libxml2 libxslt libffi
31+
pip3 install cairosvg
32+
```
33+
34+
After that, install `pipenv` with:
35+
36+
```bash
37+
python3.10 -m pip install pipenv
38+
```
39+
40+
## Installing Bot
41+
42+
Clone and change directory into the Modmail folder with:
43+
44+
```bash
45+
git clone https://github.com/modmail-dev/modmail
46+
cd modmail
47+
```
48+
49+
Inside the Modmail folder, install `pipenv` and its Python packages with:
50+
51+
<pre class="language-bash"><code class="lang-bash"><strong>python3.10 -m pipenv install --python 3.10
52+
</strong></code></pre>
53+
54+
Create a file named `.env` with `nano` and paste all the environmental variables (secrets) needed to run the bot via right-clicking in the nano editor. Refer to the steps in the [parent Installation page](../#preparing-your-environmental-variables) to find where to obtain these.
55+
56+
```bash
57+
cp .env.example .env
58+
nano .env
59+
```
60+
61+
<figure><img src="../../.gitbook/assets/image (6).png" alt=""><figcaption></figcaption></figure>
62+
63+
After that, exit the nano editor with `Ctrl+X` and select or enter `y` when prompted to save. Press enter to maintain the exiting name of the document.
64+
65+
{% hint style="info" %}
66+
If using the `nano` editor is a bit of a learning curve, you can edit the `.env` file manually with your preferred GUI-based editor like TextEdit.
67+
{% endhint %}
68+
69+
After your `.env` file is ready, you can now go ahead and try running your bot with:
70+
71+
```bash
72+
python3.10 -m pipenv run bot
73+
```
74+
75+
If no error shows up, it means your bot is now running correctly. You can stop the bot from running with `Ctrl+C` to continue using your terminal.

0 commit comments

Comments
 (0)