Skip to content

Commit 2727a9a

Browse files
committed
chore: mailpit docker service added
1 parent 62de68d commit 2727a9a

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

.envs/.backend.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ DATABASE_URL="postgresql+asyncpg://postgres:postgres@postgres:5432/bookly"
88

99
BCRYPT_ROUND=16
1010

11+
MAILPIT_USER="mailpit"
12+
MAILPIT_PASSWORD="mailpit"
13+
MAILPIT_SERVER="mailpit"
14+
MAILPIT_PORT=1025
15+
1116
JWT_SECRET="0d6dfd6448e6a1ee48dcb8e090618cf8c37dc046e8169698d22383510c8e70f3"
1217
JWT_ALGORITHM="HS256"

.envs/.mailpit.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MAILPIT_USER="mailpit"
2+
MAILPIT_PASSWORD="mailpit"
3+
MAILPIT_SMTP_PORT=1025
4+
MAILPIT_HTTP_PORT=8025

docker-compose.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ services:
2121
postgres:
2222
image: postgres:16
2323
container_name: postgres
24-
ports:
25-
- "5432:5432"
2624
volumes:
2725
- postgres_data:/var/lib/postgresql/data
2826
env_file:
@@ -36,9 +34,22 @@ services:
3634
start_period: 10s
3735
timeout: 10s
3836

37+
mailpit:
38+
image: axllent/mailpit:latest
39+
container_name: mailpit
40+
ports:
41+
- "8025:8025"
42+
volumes:
43+
- mailpit_data:/data
44+
env_file:
45+
- ./.envs/.mailpit.env
46+
networks:
47+
- backend_network
48+
3949
networks:
4050
backend_network:
4151
driver: bridge
4252

4353
volumes:
4454
postgres_data:
55+
mailpit_data:

pkg/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ class Settings(BaseSettings):
1212

1313
BCRYPT_ROUND: int = Field(..., env="BCRYPT_ROUND")
1414

15+
MAILPIT_USER: str = Field(..., env="MAILPIT_USER")
16+
MAILPIT_PASSWORD: str = Field(..., env="MAILPIT_PASSWORD")
17+
MAILPIT_SERVER: str = Field(..., env="MAILPIT_SERVER")
18+
MAILPIT_PORT: int = Field(..., env="MAILPIT_PORT")
19+
1520
JWT_SECRET: str = Field(..., env="JWT_SECRET")
1621
JWT_ALGORITHM: str = Field(..., env="JWT_ALGORITHM")
1722

0 commit comments

Comments
 (0)