Skip to content

Commit 7d627eb

Browse files
committed
Feat: mailpit 구축
1 parent a828ac9 commit 7d627eb

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

infra/docker-compose.stg.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ services:
3030

3131
mailpit:
3232
image: axllent/mailpit:latest
33-
container_name: mailpit-stg
34-
ports:
35-
- "8025:8025" # 웹 UI
36-
- "1025:1025" # SMTP
37-
restart: unless-stopped
33+
command: ["--webroot", "/mailpit/"]
34+
environment:
35+
MP_SMTP_AUTH_ACCEPT_ANY: "1"
36+
MP_SMTP_AUTH_ALLOW_INSECURE: "1"
37+
MP_DATABASE: /data/mailpit.db
38+
MP_MAX_MESSAGES: "5000"
39+
volumes:
40+
- mailpit_data:/data
3841
networks:
3942
- docsa_stg_net
4043

@@ -225,6 +228,7 @@ volumes:
225228
stg_prom_data:
226229
stg_loki_data:
227230
stg_grafana_data:
231+
mailpit_data:
228232

229233
networks:
230234
docsa_stg_net:

infra/nginx/nginx.stg.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ http {
6868
proxy_redirect off;
6969
}
7070

71+
72+
location /mailpit/ {
73+
proxy_pass http://mailpit:8025;
74+
75+
proxy_http_version 1.1;
76+
proxy_set_header Connection "";
77+
proxy_set_header Host $host;
78+
proxy_set_header X-Real-IP $remote_addr;
79+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
80+
proxy_set_header X-Forwarded-Proto $scheme;
81+
}
82+
7183
location = /actuator/prometheus { return 404; }
7284

7385
}

infra/prometheus/prometheus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ scrape_configs:
77
- job_name: 'spring-app'
88
metrics_path: /actuator/prometheus
99
static_configs:
10-
- targets: ['docsa-app:9091']
10+
- targets: ['app:9091']
1111
labels: { app: docsa }
1212

1313
# 컨테이너 리소스

0 commit comments

Comments
 (0)