Skip to content

Commit fc42d72

Browse files
authored
Support for local mail server (#7)
* feat: support for local mail server (mailpit) * chore: bump version * ci: only push on main
1 parent 496d66a commit fc42d72

File tree

6 files changed

+277
-3
lines changed

6 files changed

+277
-3
lines changed

.github/workflows/publish.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Publish Python 🐍 distribution to PyPI
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
68
- 'v*.*.*'
79

appwrite_lab/_orchestrator.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,18 @@ def deploy_appwrite_lab(
207207
cmd_res = self._deploy_service(
208208
project=name, template_path=template_path, env_vars=env_vars
209209
)
210+
211+
# Deploy mail server (mailpit)
212+
mailpit_template_path = (
213+
Path(__file__).parent
214+
/ "templates"
215+
/ "extras"
216+
/ "mailpit"
217+
/ "docker_compose.yml"
218+
)
219+
self._deploy_service(
220+
project=name, template_path=mailpit_template_path, env_vars={}
221+
)
210222
# if CLI, will throw error in actual Response object
211223
if type(cmd_res) is Response and cmd_res.error:
212224
return cmd_res

appwrite_lab/templates/environment/dotenv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ _APP_INFLUXDB_HOST=influxdb
5050
_APP_INFLUXDB_PORT=8086
5151
_APP_STATSD_HOST=telegraf
5252
_APP_STATSD_PORT=8125
53-
_APP_SMTP_HOST=
54-
_APP_SMTP_PORT=
53+
_APP_SMTP_HOST=mailpit
54+
_APP_SMTP_PORT=1025
5555
_APP_SMTP_SECURE=
5656
_APP_SMTP_USERNAME=
5757
_APP_SMTP_PASSWORD=
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
mailpit:
3+
image: axllent/mailpit:latest
4+
container_name: mailpit
5+
ports:
6+
- "1025:1025" # SMTP port
7+
- "8025:8025" # Web UI
8+
networks:
9+
- appwrite
10+
restart: unless-stopped
11+
12+
13+
networks:
14+
appwrite:
15+
name: appwrite
16+
external: true

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "appwrite-lab"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
description = "Zero-click Appwrite test environments."
99
readme = "README.md"
1010
requires-python = ">=3.11"

0 commit comments

Comments
 (0)