HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/PraisonAI/docs/developers/local-development.mdx
---
title: 'Local Development'
description: 'Set up local development environment with Docker and live reload'
---

## Logging
```bash
export LOGLEVEL=info
```

Advanced logging:
```bash
export LOGLEVEL=debug
```

## Local Docker Development with Live Reload

To facilitate local development with live reload, you can use Docker. Follow the steps below:

### 1. Create Dockerfile.dev

<CodeGroup>
```dockerfile Dockerfile.dev
FROM python:3.11-slim

WORKDIR /app

COPY . .

RUN pip install flask praisonai==2.0.18 watchdog

EXPOSE 5555

ENV FLASK_ENV=development

CMD ["flask", "run", "--host=0.0.0.0"]
```
</CodeGroup>

### 2. Create docker-compose.yml

<CodeGroup>
```yaml docker-compose.yml
version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
      - .:/app
    ports:
      - "5555:5555"
    environment:
      FLASK_ENV: development
    command: flask run --host=0.0.0.0

  watch:
    image: alpine:latest
    volumes:
      - .:/app
    command: sh -c "apk add --no-cache inotify-tools && while inotifywait -r -e modify,create,delete /app; do kill -HUP 1; done"
```
</CodeGroup>

### 3. Run Docker Compose

<CodeGroup>
```bash Terminal
docker-compose up
```
</CodeGroup>

This setup will allow you to develop locally with live reload, making it easier to test and iterate on your code.