Skip to content

Commit c32f44a

Browse files
committed
Updated docker
1 parent 0032a9d commit c32f44a

File tree

3 files changed

+195
-7
lines changed

3 files changed

+195
-7
lines changed

.dockerignore

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
.pytest_cache/
52+
53+
# Translations
54+
*.mo
55+
*.pot
56+
57+
# Django stuff:
58+
*.log
59+
local_settings.py
60+
db.sqlite3
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# PyBuilder
73+
target/
74+
75+
# Jupyter Notebook
76+
.ipynb_checkpoints
77+
78+
# IPython
79+
profile_default/
80+
ipython_config.py
81+
82+
# pyenv
83+
.python-version
84+
85+
# celery beat schedule file
86+
celerybeat-schedule
87+
88+
# SageMath parsed files
89+
*.sage.py
90+
91+
# Environments
92+
.env
93+
.venv
94+
env/
95+
venv/
96+
ENV/
97+
env.bak/
98+
venv.bak/
99+
100+
# Spyder project settings
101+
.spyderproject
102+
.spyproject
103+
104+
# Rope project settings
105+
.ropeproject
106+
107+
# mkdocs documentation
108+
/site
109+
110+
# mypy
111+
.mypy_cache/
112+
.dmypy.json
113+
dmypy.json
114+
115+
# Pyre type checker
116+
.pyre/
117+
118+
# PyCharm
119+
.idea/
120+
121+
# MacOS
122+
.DS_Store
123+
124+
# VS Code
125+
.vscode/
126+
127+
# Node
128+
package-lock.json
129+
node_modules/
130+
131+
# Modmail
132+
config.json
133+
plugins/
134+
!plugins/registry.json
135+
temp/
136+
test.py
137+
138+
# Other stuff
139+
.env.example
140+
.gitignore
141+
.lint.py
142+
.pylintrc
143+
.travis.yml
144+
app.json
145+
CHANGELOG.md
146+
CODE_OF_CONDUCT.md
147+
CONTRIBUTING.md
148+
Pipfile
149+
Pipfile.lock
150+
Procfile
151+
pyproject.toml
152+
README.md
153+
runtime.txt
154+
SPONSORS.json

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
FROM library/python:latest
2-
RUN apt update && apt install -y pipenv
3-
RUN mkdir -p /bot && cd /bot && git clone https://github.com/kyb3r/modmail .
4-
WORKDIR /bot
5-
RUN pipenv install
6-
7-
CMD ["pipenv", "run", "bot"]
1+
FROM python:3.7.4-alpine
2+
RUN apk add --no-cache git
3+
WORKDIR /modmailbot
4+
COPY . /modmailbot
5+
RUN pip install --no-cache-dir -r requirements.min.txt
6+
CMD ["python", "bot.py"]

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,41 @@ Finally, start Modmail.
131131
$ pipenv run bot
132132
```
133133

134+
#### Docker
135+
136+
This repo supplies a Dockerfile for simplified deployment.
137+
138+
You can build your own Docker image:
139+
140+
```console
141+
$ docker build . --tag=modmail
142+
```
143+
144+
or run directly from a pre-built version from https://hub.docker.com/. Currently there are two community release of Modmail:
145+
146+
- Kyber's:
147+
148+
```console
149+
$ docker pull kyb3rr/modmail
150+
```
151+
152+
- Taku's:
153+
154+
```console
155+
$ docker pull taaku18/modmail
156+
# You can also choose one of the following:
157+
$ docker pull taaku18/modmail:dev
158+
$ docker pull taaku18/modmail:<version> (<version> ex: 3.2.0, 3.2, etc.)
159+
```
160+
161+
And to run your docker image:
162+
163+
```console
164+
$ docker run --env-file .env user/modmail
165+
```
166+
- Replace `user/modmail` with `kyb3rr/modmail`, `taaku18/modmail`, `taaku18/modmail:3.2`, etc as above.
167+
- `.env` should be the path to your env file, you can also supply a path: `/path/to/.env`.
168+
134169
## Sponsors
135170

136171
Special thanks to our sponsors for supporting the project.

0 commit comments

Comments
 (0)