-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 1.56 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (46 loc) · 1.56 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-flowcms}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-flowcms_pass}
POSTGRES_DB: ${POSTGRES_DB:-flowcms}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-flowcms} -d ${POSTGRES_DB:-flowcms}"]
interval: 5s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-flowcms}:${POSTGRES_PASSWORD:-flowcms_pass}@postgres:5432/${POSTGRES_DB:-flowcms}?schema=public
- DIRECT_URL=postgresql://${POSTGRES_USER:-flowcms}:${POSTGRES_PASSWORD:-flowcms_pass}@postgres:5432/${POSTGRES_DB:-flowcms}?schema=public
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
# Add other necessary variables from .env here
- UPSTASH_REDIS_REST_URL=${UPSTASH_REDIS_REST_URL}
- UPSTASH_REDIS_REST_TOKEN=${UPSTASH_REDIS_REST_TOKEN}
- RESEND_API_KEY=${RESEND_API_KEY}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
postgres_data: