-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.03 KB
/
docker-compose.yml
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
version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile
target: backend-builder
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=${DATABASE_URL}
- JWT_SECRET=${JWT_SECRET}
- JWT_EXPIRATION=${JWT_EXPIRATION}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- CACHE_TTL=${CACHE_TTL}
ports:
- "3000:3000"
depends_on:
- db
- redis
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend-builder
environment:
- NODE_ENV=production
- VITE_API_URL=${VITE_API_URL}
ports:
- "5173:5173"
depends_on:
- backend
db:
image: postgres:17
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7
ports:
- "6379:6379"
volumes:
postgres_data: