Skip to content

Commit a0f8b34

Browse files
authored
Update README.md
1 parent 1a5eb0c commit a0f8b34

File tree

1 file changed

+159
-1
lines changed

1 file changed

+159
-1
lines changed

README.md

Lines changed: 159 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,160 @@
11
# Modmail-docker
2-
Modmail + Logviewer from Kyb3r
2+
3+
4+
Modmail-docker is using Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration
5+
6+
This repo contains a .env file and a docker-compose.yml file which will be used to setup Modmail, Logviewer, Traefik and MongoDB
7+
8+
### Prerequisites
9+
10+
- Docker
11+
- Docker-compose
12+
13+
Both must be installed prior to setting up Modmail-docker
14+
Find a guide on how to setup docker and docker-compose for your distribution
15+
16+
### Quality of life
17+
Add a alias to your .bashrc
18+
19+
```
20+
$ nano ~/.bashrc
21+
```
22+
Add in this in the bottom
23+
```sh
24+
alias dc='sudo docker-compose'
25+
```
26+
Now reload your bash to get the new alias or close your terminal and connect again
27+
```sh
28+
$ exec bash
29+
```
30+
31+
### Installation
32+
33+
Go to the directory you want modmail and logviewer to be installed in.
34+
35+
And git clone the this repo
36+
37+
```sh
38+
$ sudo git clone https://github.com/KongGal/Modmail-docker.git .
39+
```
40+
41+
Now configure the .env file to your needs by opening the file with your favourite Terminal Text Editor for this i use nano
42+
43+
```sh
44+
$ nano .env
45+
```
46+
And fill out
47+
```code
48+
MODMAIL_TOKEN=
49+
MODMAIL_GUILD_ID=
50+
MODMAIL_OWNERS=
51+
LOG_URL=
52+
```
53+
Next step is to create your docker network which the 4 containers will run on with
54+
55+
```sh
56+
$ sudo docker create network internet
57+
```
58+
Now you should have a filled out .env file and a docker network created and all there is left to do is pull the docker images
59+
```sh
60+
$ dc pull
61+
```
62+
Which will pull the latest version of
63+
- Modmail
64+
- Logviewer
65+
- Traefik
66+
- MongoDB
67+
68+
Now create the docker containers from the images together with infomation from the .env file and docker-compose.yml
69+
```sh
70+
$ dc create
71+
```
72+
73+
Run a test run to check if everything runs
74+
75+
```sh
76+
$ dc up
77+
```
78+
And you should now see it spin up each service and the logs of it
79+
If everthing seems to run fine then stop the docker compose
80+
```
81+
ctrl + C
82+
```
83+
Now to start all the containers in the background
84+
```sh
85+
$ dc start
86+
```
87+
Now all your containers should run in the background
88+
89+
90+
### Commands
91+
92+
```sh
93+
$ dc pull
94+
```
95+
dc pull which fetch the latest images, **before you do this you must stop your containers!**
96+
97+
```sh
98+
$ dc create
99+
```
100+
dc create which will create your containers with the images you pulled and your settings from docker-compose.yml and .env
101+
This most also be done everytime you change something in .env or docker-compose.yml
102+
103+
```sh
104+
$ dc start
105+
```
106+
dc start will start all containers or a targeted container by adding its name after, modmail is used here as a example
107+
```sh
108+
$ dc stop
109+
```
110+
This will stop all containers and must be done before you do a pull or create!
111+
112+
```sh
113+
$ dc logs
114+
```
115+
dc logs will show you the log files, if no container is specified then a merged logs of all containers can add -f to follow the logs
116+
117+
```sh
118+
$ dc ps
119+
```
120+
dc ps is process status which will show you the status on all the containers
121+
122+
You can with all commands use container name to only affect that container such as
123+
```sh
124+
$ dc stop modmail
125+
$ dc pull modmail
126+
$ dc create modmail
127+
$ dc start modmail
128+
$ dc logs modmail
129+
```
130+
131+
132+
### How to update
133+
134+
Stop your containers with
135+
```sh
136+
$ dc stop
137+
```
138+
Pull latest version of images
139+
```sh
140+
$ dc pull
141+
```
142+
Rebuild containers with the new images
143+
```sh
144+
$ dc create
145+
```
146+
Start your containers again with
147+
```sh
148+
$ dc start
149+
```
150+
and your Modmail, Logviewer, Traefik, MongoDB is up to date
151+
152+
### Extra
153+
154+
If you want to run a inbox server you have to remove comment from
155+
```python
156+
- MODMAIL_GUILD_ID=${MODMAIL_INBOX_GUILD_ID}
157+
```
158+
in the docker-composer.yml on line 30
159+
160+
for issues or need of help feel free to create a issue or come poke me on the modmail support discord server

0 commit comments

Comments
 (0)