-
-
Notifications
You must be signed in to change notification settings - Fork 265
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
145 lines (134 loc) · 4.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
145 lines (134 loc) · 4.67 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
services:
# --- PostgreSQL Database (with pgvector extension for embeddings) ---
postgres:
image: pgvector/pgvector:pg17
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-nextcrm}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
POSTGRES_DB: ${POSTGRES_DB:-nextcrm}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- nextcrm
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-nextcrm}"]
interval: 5s
timeout: 5s
retries: 5
# Uncomment to expose Postgres to host:
# ports:
# - "5432:5432"
# --- MinIO Object Storage ---
minio:
image: minio/minio:latest
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-nextcrm}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-changeme}
volumes:
- minio_data:/data
networks:
- nextcrm
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
# Uncomment to expose MinIO to host:
# ports:
# - "9000:9000"
# - "9001:9001"
# --- Inngest Dev Server ---
inngest:
image: inngest/inngest:latest
restart: unless-stopped
command: inngest dev -u http://app:3000/api/inngest
networks:
- nextcrm
# No healthcheck: the inngest/inngest image ships no HTTP client
# (no curl/wget/nc), so any exec-based probe fails permanently. The app
# depends on this service with `service_started` instead — safe here
# because the dev server polls the app for functions, not the reverse.
# Uncomment to expose Inngest dashboard to host:
# ports:
# - "8288:8288"
# --- NextCRM Application ---
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
environment:
# Database — values come from the same env vars as the postgres
# service above so a single override changes both sides.
DATABASE_URL: postgresql://${POSTGRES_USER:-nextcrm}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-nextcrm}
DB_HOST: postgres
DB_PORT: "5432"
DB_USER: ${POSTGRES_USER:-nextcrm}
DB_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
DB_NAME: ${POSTGRES_DB:-nextcrm}
# Auth
BETTER_AUTH_URL: http://localhost:3000
# BETTER_AUTH_SECRET is auto-generated if not set
# MinIO — values come from the same env vars as the minio service.
NEXT_PUBLIC_MINIO_ENDPOINT: http://minio:9000
MINIO_ENDPOINT: http://minio:9000
MINIO_PORT: "9000"
MINIO_BUCKET: nextcrm
MINIO_USE_SSL: "false"
MINIO_ACCESS_KEY: ${MINIO_ROOT_USER:-nextcrm}
MINIO_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-changeme}
# Inngest
INNGEST_DEV: "1"
INNGEST_ID: nextcrm
INNGEST_APP_NAME: NextCRM
INNGEST_EVENT_KEY: local
INNGEST_SIGNING_KEY: ""
INNGEST_BASE_URL: http://inngest:8288
# App
NEXT_PUBLIC_APP_NAME: NextCRM
NEXT_PUBLIC_APP_URL: http://localhost:3000
# Initial admin account (created on first run by the seed script).
# IMPORTANT: set this to a real email you control. The app uses
# passwordless Email OTP, so the placeholder default cannot
# receive login codes. Override via .env on first start, then
# configure SMTP/Resend (RESEND_API_KEY) so OTP emails actually
# send. Without an email provider you can read the OTP from
# the database directly.
TEST_USER_EMAIL: ${ADMIN_EMAIL:-admin@example.com}
# Placeholder values for optional external services.
# The app initializes these clients at module load time, so empty
# values cause crashes. Users override these via .env to enable
# the corresponding features. The app runs fine with placeholders;
# individual features just won't work until real keys are provided.
OPENAI_API_KEY: ${OPENAI_API_KEY:-sk-placeholder-replace-to-enable-ai}
RESEND_API_KEY: ${RESEND_API_KEY:-re_placeholder_replace_to_enable_email}
GOOGLE_ID: ${GOOGLE_ID:-}
GOOGLE_SECRET: ${GOOGLE_SECRET:-}
FIRECRAWL_API_KEY: ${FIRECRAWL_API_KEY:-}
E2B_API_KEY: ${E2B_API_KEY:-}
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
inngest:
condition: service_started
networks:
- nextcrm
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
postgres_data:
minio_data:
networks:
nextcrm:
driver: bridge