Running Doccano with Docker
This guide explains how to run doccano using Docker and Docker Compose, including the steps needed to ensure export functionality.
1. Clone the Repository
bash
git clone https://github.com/doccano/doccano.git
cd doccano2. Build and Start the Containers
bash
docker compose -f docker/compose.prod.yml up --buildThis will start:
- The Django backend
- The frontend UI
- The Celery worker (required for export)
- Redis (for task queue)
3. Access the Web UI
Open http://localhost:8000 in your browser.
4. Create a Superuser
In a new terminal, run:
bash
docker compose -f docker/compose.prod.yml exec backend python manage.py createsuperuser5. Use Doccano
- Log in with your superuser credentials.
- Create a project, import data, annotate, and export.
6. Stopping Doccano
To stop all services:
bash
docker compose -f docker/compose.prod.yml downTroubleshooting
- Export not working? The Celery worker must be running (it is included in the default Docker Compose setup). If you see no exported file, check the logs of the
workerservice:bashdocker compose -f docker/compose.prod.yml logs worker - Persistent data: By default, the database is stored in a Docker volume for persistence between runs.