You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.8 KiB

  1. # Getting started
  2. ## Usage
  3. doccano has two options to run:
  4. - (Recommended) Docker Compose
  5. - Docker
  6. The usage of docker compose version is explained in the [README.md](https://github.com/doccano/doccano/blob/master/README.md#usage). We highly recommend that you should use docker compose version. However, we explain the usage of Docker version and Python/Node version for the additional information.
  7. ### Docker
  8. As a one-time setup, create a Docker container for Doccano:
  9. ```bash
  10. docker pull doccano/doccano
  11. docker container create --name doccano \
  12. -e "ADMIN_USERNAME=admin" \
  13. -e "ADMIN_EMAIL=admin@example.com" \
  14. -e "ADMIN_PASSWORD=password" \
  15. -p 8000:8000 doccano/doccano
  16. ```
  17. Next, start Doccano by running the container:
  18. ```bash
  19. docker container start doccano
  20. ```
  21. To stop the container, run `docker container stop doccano -t 5`.
  22. All data created in the container will persist across restarts.
  23. Go to <http://127.0.0.1:8000/>.
  24. ### For Developers
  25. You can setup local development environment as follows:
  26. ```bash
  27. git clone https://github.com/doccano/doccano.git
  28. cd doccano
  29. docker-compose -f docker-compose.dev.yml up
  30. ```
  31. Go to <http://127.0.0.1:3000/>.
  32. Or, you can setup via Python and Node.js:
  33. ### Python
  34. ```bash
  35. git clone https://github.com/doccano/doccano.git
  36. cd doccano
  37. pipenv sync --dev
  38. pipenv shell
  39. cd backend
  40. python manage.py migrate
  41. python manage.py create_roles
  42. python manage.py create_admin --noinput --username "admin" --email "admin@example.com" --password "password"
  43. python manage.py runserver
  44. ```
  45. In another terminal, you need to run Celery to use import/export dataset feature:
  46. ```bash
  47. cd doccano/backend
  48. celery --app=config worker --loglevel=INFO --concurrency=1
  49. ```
  50. ### Node.js
  51. ```bash
  52. cd frontend
  53. yarn install
  54. yarn dev
  55. ```
  56. Go to <http://127.0.0.1:3000/>.