Skip to content

Commit

Permalink
[DOP-13293] Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-pedchenko committed Mar 27, 2024
1 parent d5bd6fc commit e738b24
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ jobs:
- name: Build package
run: poetry build

# - name: Publish package
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1

- name: Get changelog
run: |
Expand Down
24 changes: 12 additions & 12 deletions docs/backend/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,24 @@ but the only one we really tested is Postgres.

See :ref:`Database settings <backend-configuration-database>` for more options.

Run migrations
~~~~~~~~~~~~~~
Run worker
~~~~~~~~~~

To apply migrations (database structure changes) you need to execute following command:
.. note::

.. code-block:: console
Before starting the worker you need to create a queue.
The queue is created by sending a post request to ``/queues`` endpoint (See Swagger doc for details).

для запуска воркера нужно выполнить команду

$ python -m syncmaster.backend.db.migrations upgrade head
.. code-block:: console
This is a thin wrapper around `alembic <https://alembic.sqlalchemy.org/en/latest/tutorial.html#running-our-first-migration>`_ cli,
options and commands are just the same.
$ celery -A syncmaster.worker.config.celery worker --loglevel=info --max-tasks-per-child=1 -Q queue_name
.. note::

This command should be executed after each upgrade to new syncmaster version.
The specified celery options are given as an example, you can specify other options you need.


Run backend
~~~~~~~~~~~
Expand All @@ -91,9 +94,6 @@ To start backend server you need to execute following command:

.. code-block:: console
$ python -m syncmaster.backend.main --host 0.0.0.0 --port 8000
This is a thin wrapper around `uvicorn <https://www.uvicorn.org/#command-line-options>`_ cli,
options and commands are just the same.
$ python -m syncmaster.backend.main
After server is started and ready, open http://localhost:8000/docs.
1 change: 0 additions & 1 deletion docs/changelog/0.0.1.rst

This file was deleted.

0 comments on commit e738b24

Please sign in to comment.