-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
138 lines (132 loc) · 3.45 KB
/
docker-compose.yml
File metadata and controls
138 lines (132 loc) · 3.45 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
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: firelater-postgres
restart: unless-stopped
environment:
POSTGRES_USER: firelater
POSTGRES_PASSWORD: firelater_password
POSTGRES_DB: firelater
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U firelater"]
interval: 10s
timeout: 5s
retries: 5
networks:
- firelater-network
# Redis for caching and queues
redis:
image: redis:7-alpine
container_name: firelater-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- firelater-network
# MinIO for file storage (S3-compatible)
minio:
image: minio/minio:latest
container_name: firelater-minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin123
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- firelater-network
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: firelater-backend
restart: unless-stopped
environment:
NODE_ENV: production
DISABLE_SECURE_COOKIES: "true"
PORT: 3001
HOST: 0.0.0.0
DATABASE_URL: postgres://firelater:firelater_password@postgres:5432/firelater
REDIS_URL: redis://redis:6379
JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt-key-min-32-chars-long}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-your-super-secret-refresh-key-min-32-chars}
JWT_ACCESS_EXPIRY: 15m
JWT_REFRESH_EXPIRY: 7d
S3_ENDPOINT: http://minio:9000
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin123
S3_BUCKET: firelater-attachments
S3_REGION: us-east-1
SENDGRID_API_KEY: ${SENDGRID_API_KEY:-}
SLACK_WEBHOOK_URL: ${SLACK_WEBHOOK_URL:-}
LOG_LEVEL: info
ports:
- "3001:3001"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- firelater-network
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_URL: http://localhost:3001
container_name: firelater-frontend
restart: unless-stopped
environment:
NODE_ENV: production
NEXT_PUBLIC_API_URL: http://localhost:3001
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- firelater-network
volumes:
postgres_data:
redis_data:
minio_data:
networks:
firelater-network:
driver: bridge