Add contacts, reply/forward, pagination, HTML toggle, Docker Compose for VPS
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# PostgreSQL — база данных
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: mail-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: mailserver
|
||||
POSTGRES_USER: mail
|
||||
POSTGRES_PASSWORD: secret
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U mail"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Почтовый сервер (Spring Boot WebFlux)
|
||||
mail-server:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: mail-server
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: prod
|
||||
SPRING_R2DBC_URL: r2dbc:postgresql://postgres:5432/mailserver
|
||||
SPRING_R2DBC_USERNAME: mail
|
||||
SPRING_R2DBC_PASSWORD: secret
|
||||
SPRING_FLYWAY_URL: jdbc:postgresql://postgres:5432/mailserver
|
||||
SPRING_FLYWAY_USER: mail
|
||||
SPRING_FLYWAY_PASSWORD: secret
|
||||
MAILSERVER_SMTP_HOSTNAME: mail.jambotron.com
|
||||
MAILSERVER_SMTP_PORT: 3025
|
||||
MAILSERVER_RELAY_ENABLED: "true"
|
||||
MAILSERVER_RELAY_PORT: 25
|
||||
MAILSERVER_DKIM_DOMAIN: jambotron.com
|
||||
ports:
|
||||
- "8080:8080" # REST API (через Caddy)
|
||||
- "3025:3025" # SMTP входящие
|
||||
volumes:
|
||||
- attachments:/app/attachments
|
||||
- dkim-keys:/app/dkim-keys
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
# Caddy — reverse proxy с HTTPS
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
container_name: mail-caddy
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mail-server
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
- ./frontend/dist/frontend/browser:/usr/share/caddy
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
attachments:
|
||||
dkim-keys:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
Reference in New Issue
Block a user