name: instagram-api-free services: api: build: context: . target: runtime stdin_open: true tty: true ports: - "8000:8000" # Production: copy .env.example to .env and fill in API_KEY before running. # Development: env_file is optional; service runs open without API_KEY set. env_file: - path: .env required: false environment: # AIOGRAPI_REST_DB_PATH is also set in .env; the explicit entry here # ensures the data volume is used even if .env is absent. AIOGRAPI_REST_DB_PATH: /data/db.json volumes: - instagram_api_data:/data test: profiles: - test build: context: . target: test volumes: - .:/app command: pytest volumes: instagram_api_data: