-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.44 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.44 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
services:
postgres:
image: postgres:16-alpine
container_name: dts-postgres
restart: unless-stopped
environment:
POSTGRES_DB: user-auth
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d user-auth"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: dts-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
app:
build:
context: .
dockerfile: Dockerfile
container_name: dts-app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/user-auth?schema=public
SECRET_KEY: ${SECRET_KEY:-your_secret_key}
RESEND_API_KEY: ${RESEND_API_KEY:-}
RESEND_FROM_EMAIL: ${RESEND_FROM_EMAIL:-onboarding@resend.dev}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
REDIS_URL: redis://redis:6379
PORT: 5007
NODE_ENV: production
FRONTEND_ORIGIN: ${FRONTEND_ORIGIN:-http://localhost:5173}
ports:
- "5007:5007"
command: sh -c "npx prisma migrate deploy && npx prisma generate && npm run start"
volumes:
postgres_data:
redis_data: