Перейти к содержанию

Installation & Launch Guide

Requirements

  • Docker and Docker Compose
  • Make
  • Python 3.9+ (if running locally, not via Docker)
  1. Clone the repository:
    git clone https://github.com/your-org/online-shop.git
    cd online-shop
    
  2. Build and start the services:
    make build
    make up
    
  3. Check that the service is available:
  4. API: http://localhost:5005 (or the port specified in docker-compose.yml)

Running Tests

  • All tests:
    make test
    
  • Unit tests:
    make unit-tests
    
  • Integration tests:
    make integration-tests
    
  • E2E tests:
    make e2e-tests
    

Environment Variables

  • DB_HOST — database host (default: localhost)
  • DB_PASSWORD — database user password (default: abc123)
  • API_HOST — API host (default: localhost)

Manual Launch (without Docker)

  1. Install dependencies:
    pip install -r requirements.txt
    pip install -e src
    
  2. Start Postgres locally and set environment variables.
  3. Run the Flask app:
    export FLASK_APP=allocation.entrypoints.flask_app
    export PYTHONPATH=src
    flask run --host=0.0.0.0 --port=5005
    

← Back to Table of Contents