Skip to content

Commit aa2e170

Browse files
committed
fix unsend service
1 parent 416e636 commit aa2e170

File tree

2 files changed

+60
-59
lines changed

2 files changed

+60
-59
lines changed

templates/compose/resend.yaml

Lines changed: 0 additions & 59 deletions
This file was deleted.

templates/compose/unsend.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# documentation: https://docs.unsend.dev/get-started/self-hosting
2+
# slogan: Unsend is an open-source alternative to Resend, Sendgrid, Mailgun and Postmark etc.
3+
# tags: resend, mailer, marketing emails, transaction emails, self-hosting, postmark
4+
# logo: svgs/unsend.svg
5+
# port: 3000
6+
7+
services:
8+
postgres:
9+
image: postgres:16
10+
environment:
11+
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
12+
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
13+
- POSTGRES_DB=${SERVICE_DB_POSTGRES:-unsend}
14+
healthcheck:
15+
test: ["CMD", "pg_isready", "-U", "${SERVICE_USER_POSTGRES}"]
16+
interval: 10s
17+
timeout: 5s
18+
retries: 5
19+
volumes:
20+
- unsend-postgres-data:/var/lib/postgresql/data
21+
22+
redis:
23+
image: redis:7
24+
volumes:
25+
- unsend-redis-data:/data
26+
command: ["redis-server", "--maxmemory-policy", "noeviction"]
27+
healthcheck:
28+
test:
29+
- CMD
30+
- redis-cli
31+
- PING
32+
interval: 5s
33+
timeout: 10s
34+
retries: 20
35+
36+
unsend:
37+
image: unsend/unsend:latest
38+
environment:
39+
- SERVICE_FQDN_UNSEND_3000
40+
- DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${SERVICE_DB_POSTGRES:-unsend}
41+
- NEXTAUTH_URL=${SERVICE_FQDN_UNSEND}
42+
- NEXTAUTH_SECRET=${SERVICE_BASE64_64_NEXTAUTHSECRET}
43+
- AWS_ACCESS_KEY=${SERVICE_AWS_ACCESS_KEY}
44+
- AWS_SECRET_KEY=${SERVICE_AWS_SECRET_KEY}
45+
- AWS_DEFAULT_REGION=${SERVICE_AWS_DEFAULT_REGION}
46+
- GITHUB_ID=${SERVICE_GITHUB_ID:-1234567890}
47+
- GITHUB_SECRET=${SERVICE_GITHUB_SECRET:-abcde1234567890}
48+
- REDIS_URL=redis://redis:6379
49+
- NEXT_PUBLIC_IS_CLOUD=${NEXT_PUBLIC_IS_CLOUD:-false}
50+
- API_RATE_LIMIT=${SERVICE_API_RATE_LIMIT:-1}
51+
depends_on:
52+
postgres:
53+
condition: service_healthy
54+
redis:
55+
condition: service_healthy
56+
healthcheck:
57+
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"]
58+
interval: 2s
59+
timeout: 10s
60+
retries: 15

0 commit comments

Comments
 (0)