Skip to content

Commit 4d97f88

Browse files
committed
Add pip included image
1 parent 8b6bf1e commit 4d97f88

4 files changed

Lines changed: 47 additions & 15 deletions

File tree

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,23 @@ WORKDIR /modmail
2222
RUN pdm install --check --prod --no-editable --fail-fast;
2323

2424
ARG INCLUDE_SUPPORTUTILS=false
25+
ARG INCLUDE_PIP=false
2526

2627
RUN if [ "$INCLUDE_SUPPORTUTILS" = "true" ]; then \
2728
pdm install --prod -G supportutils --no-editable --fail-fast; \
2829
fi
2930

31+
RUN if [ "$INCLUDE_PIP" = "true" ]; then \
32+
/modmail/.venv/bin/python -m ensurepip --upgrade; \
33+
fi
34+
3035
FROM base AS runtime
3136

3237
RUN adduser --disabled-password modmail
3338
USER modmail
3439

3540

36-
ENV USING_DOCKER yes
41+
ENV USING_DOCKER=yes
3742
COPY --chown=modmail:modmail --from=builder /modmail /modmail
3843

3944
COPY --chown=modmail:modmail . /modmail

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<img src="https://img.shields.io/badge/Version-4.1.0-7d5edd?style=shield&logo=https://modmail-docs.netlify.app/favicon.png">
1010
</a>
1111
<a href="https://www.python.org/downloads/">
12-
<img src="https://img.shields.io/badge/Compatible%20With-Python%203.10%20|%203.11-blue.svg?style=shield&logo=Python" alt="Made with Python 3.8">
12+
<img src="https://img.shields.io/badge/Compatible%20With-Python%203.12%20|%203.13-blue.svg?style=shield&logo=Python" alt="Made with Python 3.12">
1313
</a>
1414
<a href="https://github.com/ambv/black">
1515
<img src="https://img.shields.io/badge/Code%20Style-Black-black?style=shield">
@@ -26,10 +26,10 @@
2626
> of modmail.
2727
> This fork is not affiliated with the original modmail project.
2828
> It was done to add features that were not being added to the original modmail project due to its inactivity and to
29-
> better align with what I wanted for modmail-viewer
29+
> better align with what I wanted for modmail-viewer.
3030
> You probably shouldn't use this, but if you for some reason do, it does have some extra features, fixes, and bugs.
3131
32-
I am the developer of [modmail-viewer](https://github.com/khakers/modmail-viewer), which is the recommended way to view
32+
I am the developer of [modmail-viewer](https://github.com/khakers/modmail-viewer) and [modmail-viewer-ts](https://github.com/khakers/modmail-viewer-ts), which are the recommended way to view
3333
logs for this fork.
3434

3535
## Features
@@ -53,7 +53,7 @@ logs for this fork.
5353
* **Robust implementation:**
5454
* Schedule tasks in human time, e.g. `?close in 2 hours silently`.
5555
* Editing and deleting messages are synced.
56-
* Support for the diverse range of message contents (multiple images, files).
56+
* Support for a diverse range of message contents (multiple images, files).
5757
* Paginated commands interfaces via reactions.
5858

5959

@@ -100,11 +100,23 @@ This guide assume you already have Docker or Docker Compose installed.
100100
```console
101101
$ docker compose up -d
102102
```
103+
104+
### Docker image tags
105+
106+
To pin to a specific version, use either the sha256 hash of the image or the commit sha. ex: `ghcr.io/khakers/openmodmail:sha-24286a`.
107+
For most users, the latest tag is recommended and will be updated to point to stable releases when they become available.
108+
> [!WARNING]
109+
> The latest tag currently points to development releases, but will change in the future.
110+
111+
### Image tag variants
112+
113+
Images with '-supportutils' include a fixed version of the supportutils package, used by a number of plugins.
114+
Images with '-pip' include pip installed into the virtual environment, which is required for some plugins. It is not currently included by default
103115
104116
## Plugins
105117

106118
Modmail supports the use of third-party plugins to extend or add functionalities to the bot.
107-
Plugins allow niche features as well as anything else outside of the scope of the core functionality of Modmail.
119+
Plugins allow niche features as well as anything else outside the scope of core Modmail functionality.
108120

109121
You can find a list of third-party plugins using the `?plugins registry` command on the bot or by reading through the official [REGISTRY.json](https://github.com/modmail-dev/modmail/blob/master/plugins/registry.json).
110122

dev.docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ services:
66
context: .
77
dockerfile: Dockerfile
88
args:
9-
INCLUDE_SUPPORTUTILS: true
9+
INCLUDE_SUPPORTUTILS: "true"
10+
INCLUDE_PIP: "true"
1011
PYTHON_VERSION: 3.13
1112
# env_file:
1213
# - .env

docker-bake.hcl

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,30 @@ target "_common" {
66
}
77

88
target "openmodmail" {
9+
name = "openmodmail${notequal("",INCLUDE_SUPPORTUTILS) ? "-supportutils" : ""}${notequal("",INCLUDE_PIP) ? "-pip" : ""}"
910
inherits = ["_common"]
1011
context = "."
1112
dockerfile = "Dockerfile"
12-
}
13-
14-
target "openmodmail-supportutils" {
15-
inherits = ["_common"]
16-
context = "."
17-
dockerfile = "Dockerfile"
18-
args = {
19-
INCLUDE_SUPPORTUTILS = "true"
13+
matrix = {
14+
INCLUDE_SUPPORTUTILS = ["true", ""]
15+
INCLUDE_PIP = ["true", ""]
2016
}
2117
}
18+
19+
# target "openmodmail-supportutils" {
20+
# inherits = ["_common"]
21+
# context = "."
22+
# dockerfile = "Dockerfile"
23+
# args = {
24+
# INCLUDE_SUPPORTUTILS = "true"
25+
# }
26+
# }
27+
#
28+
# target "openmodmail-pip" {
29+
# inherits = ["_common"]
30+
# context = "."
31+
# dockerfile = "Dockerfile"
32+
# args = {
33+
# INCLUDE_PIP = "true"
34+
# }
35+
# }

0 commit comments

Comments
 (0)