You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.0 KiB

version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: market_data_postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres123
POSTGRES_DB: marketdata
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: market_data_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
market-data-service:
build: .
container_name: market_data_service
environment:
DATABASE_URL: "postgresql://postgres:postgres123@postgres:5432/marketdata"
REDIS_URL: "redis://redis:6379/0"
PORT: "8080"
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
command: python -m app.main
volumes:
postgres_data:
redis_data: