forked from Base360-AI/New_devs_App
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.22 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
version: '3.8'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/propertyflow
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=debug_challenge_secret
depends_on:
- db
- redis
volumes:
- ./backend:/app
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:80" # Mapping internal 80 (nginx) to 3000
environment:
- VITE_API_URL=http://localhost:8000
depends_on:
- backend
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=propertyflow
ports:
- "5433:5432"
volumes:
# Initialize DB with schema and seeds
- ./database/schema.sql:/docker-entrypoint-initdb.d/1-schema.sql
- ./database/seed.sql:/docker-entrypoint-initdb.d/2-seed.sql
# Ephemeral storage for easy reset (comment out to persist)
# - pgdata:/var/lib/postgresql/data
redis:
image: redis:alpine
ports:
- "6380:6379" # Maps internal 6379 to host 6380 to avoid local conflicts
volumes:
pgdata: