finance-api/docker-compose.yml
Заид Омар Медхат 33602d0fe9 chore: initialize NestJS project with Docker and environment configuration
Add project scaffolding and development infrastructure:
- Add environment configuration files (.env.development, .env.example) with database, JWT, security, AI integration, logging, and CORS settings
- Add .gitignore to exclude build artifacts, logs, IDE files, and environment variables
- Add .prettierrc with single quotes and trailing commas configuration
- Add multi-stage Dockerfile with development, build, and production stages
- Ad
2025-12-13 15:45:08 +05:00

55 lines
1.2 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:14-alpine
container_name: finance_postgres
environment:
POSTGRES_USER: finance_user
POSTGRES_PASSWORD: dev_password_123
POSTGRES_DB: finance_app
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U finance_user -d finance_app"]
interval: 10s
timeout: 5s
retries: 5
networks:
- finance_network
app:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: finance_app
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=finance_user
- DB_PASSWORD=dev_password_123
- DB_NAME=finance_app
volumes:
- .:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
networks:
- finance_network
command: npm run start:dev
volumes:
postgres_data:
networks:
finance_network:
driver: bridge