Skip to content

Commit e1bcae7

Browse files
authored
add resend.yaml
1 parent 69fc4c7 commit e1bcae7

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

templates/compose/resend.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
container_name: unsend-db-prod
11+
restart: always
12+
environment:
13+
- POSTGRES_USER=${SERVICE_POSTGRES_USER:?err}
14+
- POSTGRES_PASSWORD=${SERVICE_POSTGRES_PASSWORD:?err}
15+
- POSTGRES_DB=${SERVICE_POSTGRES_DB:?err}
16+
healthcheck:
17+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
18+
interval: 10s
19+
timeout: 5s
20+
retries: 5
21+
# ports:
22+
# - "5432:5432"
23+
volumes:
24+
- unsend-db:/var/lib/postgresql/data
25+
26+
redis:
27+
image: redis:7
28+
container_name: unsend-redis-prod
29+
restart: always
30+
# ports:
31+
# - "6379:6379"
32+
volumes:
33+
- unsend-cache:/data
34+
command: ["redis-server", "--maxmemory-policy", "noeviction"]
35+
36+
unsend:
37+
image: unsend/unsend:latest
38+
container_name: unsend
39+
restart: always
40+
ports:
41+
- ${PORT:-3000}:${PORT:-3000}
42+
environment:
43+
- PORT=${PORT:-3000}
44+
- DATABASE_URL=postgresql://postgres:${SERVICE_POSTGRES_PASSWORD}@postgres:5432/resend
45+
- NEXTAUTH_URL=${SERVICE_NEXTAUTH_URL:?err}
46+
- NEXTAUTH_SECRET=${SERVICE_NEXTAUTH_SECRET:?err}
47+
- AWS_ACCESS_KEY=${SERVICE_AWS_ACCESS_KEY:?err}
48+
- AWS_SECRET_KEY=${SERVICE_AWS_SECRET_KEY:?err}
49+
- AWS_DEFAULT_REGION=${SERVICE_AWS_DEFAULT_REGION:?err}
50+
- GITHUB_ID=${SERVICE_GITHUB_ID:?err}
51+
- GITHUB_SECRET=${SERVICE_GITHUB_SECRET:?err}
52+
- REDIS_URL=redis://redis:6379
53+
- NEXT_PUBLIC_IS_CLOUD=${NEXT_PUBLIC_IS_CLOUD:-false}
54+
- API_RATE_LIMIT=${SERVICE_API_RATE_LIMIT:-1}
55+
depends_on:
56+
postgres:
57+
condition: service_healthy
58+
redis:
59+
condition: service_started
60+
61+
volumes:
62+
unsend-db:
63+
unsend-cache:

0 commit comments

Comments
 (0)