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.

70 lines
1.6 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/app
  37. $ pip install -r requirements.txt
  38. $ python manage.py migrate
  39. $ python manage.py create_roles
  40. $ python manage.py create_admin --noinput --username "admin" --email "admin@example.com" --password "password"
  41. $ python manage.py runserver
  42. ```
  43. ### Node.js
  44. ```bash
  45. $ cd doccano/frontend
  46. $ yarn install
  47. $ yarn dev
  48. ```
  49. Go to <http://127.0.0.1:3000/>.