-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (35 loc) Β· 888 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (35 loc) Β· 888 Bytes
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
services:
# π Postgres Database (SQL)
postgres_db:
image: postgres:15
container_name: trend_postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: reddit_db
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# π¦ Redis Cache & Queue Broker
redis:
image: redis:7-alpine
container_name: trend_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
# π API Gateway (Nginx)
api_gateway:
image: nginx:1.25-alpine
container_name: trend_gateway
ports:
- "8080:80"
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
# Needs host.docker.internal to route back to local native FastAPI on host machine
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
postgres_data:
redis_data: