-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
101 lines (95 loc) · 2.71 KB
/
compose.dev.yaml
File metadata and controls
101 lines (95 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
services:
mesahub:
container_name: emailflare-mesahub
build:
context: ./infra
dockerfile: Dockerfile.mesahub
env_file:
- .env.local
environment:
- PORT=3002
- ADMIN_TOKEN=${ADMIN_TOKEN}
- SESSION_SECRET=${SESSION_SECRET}
- FILE_TOKEN_SIGNING_SECRET=${SESSION_SECRET}
- DATA_PATH=/data
- DB_NAME=emailflare
- ENABLE_TEST_MODE=true
volumes:
- mesahub-data:/data
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3002/api/health"]
interval: 5s
timeout: 3s
retries: 12
start_period: 30s
backend:
container_name: emailflare-backend
build:
context: ./services/backend
dockerfile: Dockerfile
target: dev
command: sh -c "cd /emails && npm install --prefer-offline && npm run build && cd /app && npm install && tsx watch src/index.ts"
env_file:
- .env.local
environment:
- NODE_ENV=development
# Keep backend internal port stable for Caddy upstream.
- PORT=3000
# Embedded mesahub running in the mesahub service above.
# Override MESAHUB_URL to point to an external instance if needed.
- MESAHUB_URL=mh://${ADMIN_TOKEN}@mesahub:3002/emailflare
- SMTP_HOST=mailpit
- SMTP_PORT=1025
depends_on:
mesahub:
condition: service_healthy
mailpit:
condition: service_started
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./services/emails:/emails
- emails-node-modules:/emails/node_modules
- ./services/backend/src:/app/src
- ./services/backend/package.json:/app/package.json
- backend-node-modules:/app/node_modules
mailpit:
container_name: emailflare-mailpit
image: axllent/mailpit:latest
environment:
- MP_WEBROOT=/mailpit
- MP_UI_AUTH=${MAILPIT_USER:-root}:${MAILPIT_PASS:-${ADMIN_TOKEN}}
ports:
- "2025:1025"
- "8026:8025"
admin:
container_name: emailflare-admin
build:
context: ./services/admin
dockerfile: Dockerfile
target: dev
command: sh -c "npm install && npm run dev"
volumes:
- ./services/admin/src:/app/src
- ./services/admin/.tanstack:/app/.tanstack
- ./services/admin/index.html:/app/index.html:ro
- ./services/admin/package.json:/app/package.json
- admin-node-modules:/app/node_modules
expose:
- "5173"
edge:
container_name: emailflare-edge
image: caddy:2-alpine
volumes:
- ./infra/Caddyfile.dev:/etc/caddy/Caddyfile:ro
ports:
- "${PORT:-8090}:80"
depends_on:
- backend
- admin
- mailpit
volumes:
backend-node-modules:
emails-node-modules:
admin-node-modules:
mesahub-data: