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.

92 lines
2.2 KiB

  1. # Getting started
  2. ## Usage
  3. Two options to run doccano:
  4. - (Recommended) Docker Compose
  5. - Docker
  6. ### Docker Compose
  7. ```bash
  8. $ git clone https://github.com/doccano/doccano.git
  9. $ cd doccano
  10. $ docker-compose -f docker-compose.prod.yml up
  11. ```
  12. Go to <http://0.0.0.0/>.
  13. _Note the superuser account credentials located in the `docker-compose.prod.yml` file:_
  14. ```yml
  15. ADMIN_USERNAME: "admin"
  16. ADMIN_PASSWORD: "password"
  17. ```
  18. > Note: If you want to add annotators, see [Frequently Asked Questions](https://github.com/doccano/doccano/wiki/Frequently-Asked-Questions#i-want-to-add-annotators)
  19. _Note for Windows developers: Be sure to configure git to correctly handle line endings or you may encounter `status code 127` errors while running the services in future steps. Running with the git config options below will ensure your git directory correctly handles line endings._
  20. ```bash
  21. git clone https://github.com/doccano/doccano.git --config core.autocrlf=input
  22. ```
  23. ### Docker
  24. As a one-time setup, create a Docker container for Doccano:
  25. ```bash
  26. docker pull doccano/doccano
  27. docker container create --name doccano \
  28. -e "ADMIN_USERNAME=admin" \
  29. -e "ADMIN_EMAIL=admin@example.com" \
  30. -e "ADMIN_PASSWORD=password" \
  31. -p 8000:8000 doccano/doccano
  32. ```
  33. Next, start Doccano by running the container:
  34. ```bash
  35. docker container start doccano
  36. ```
  37. To stop the container, run `docker container stop doccano -t 5`.
  38. All data created in the container will persist across restarts.
  39. Go to <http://127.0.0.1:8000/>.
  40. ### For Developers
  41. You can setup local development environment as follows:
  42. ```bash
  43. $ git clone https://github.com/doccano/doccano.git
  44. $ cd doccano
  45. $ docker-compose -f docker-compose.dev.yml up
  46. ```
  47. Go to <http://127.0.0.1:3000/>.
  48. Or, you can setup via Python and Node.js:
  49. ### Python
  50. ```bash
  51. $ git clone https://github.com/doccano/doccano.git
  52. $ cd doccano/app
  53. $ pip install -r requirements.txt
  54. $ python manage.py migrate
  55. $ python manage.py create_roles
  56. $ python manage.py create_admin --noinput --username "admin" --email "admin@example.com" --password "password"
  57. $ python manage.py runserver
  58. ```
  59. ### Node.js
  60. ```bash
  61. $ cd doccano/frontend
  62. $ yarn install
  63. $ yarn dev
  64. ```
  65. Go to <http://127.0.0.1:3000/>.