Skip to content

Commit 87ca86c

Browse files
committed
[DOP-25282] Add frontend docs
1 parent 2428d4a commit 87ca86c

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
reference/database/index
1919
reference/broker/index
2020
reference/server/index
21+
reference/frontend/index
2122
reference/worker/index
2223
reference/scheduler/index
2324

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _configuration-frontend:
2+
3+
Frontend configuration
4+
======================
5+
6+
API url
7+
-------
8+
9+
SyncMaster UI requires REST API to be accessible from browser. API url is set up using environment variable:
10+
11+
.. code:: bash
12+
13+
SYNCMASTER__UI__API_BROWSER_URL=http://localhost:8000
14+
15+
If both REST API and frontend are served on the same domain (e.g. through Nginx reverse proxy), for example:
16+
17+
- REST API → ``/api``
18+
- Frontend → ``/``
19+
20+
Then you can use relative path:
21+
22+
.. code:: bash
23+
24+
SYNCMASTER__UI__API_BROWSER_URL=/api

docs/reference/frontend/index.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.. _frontend:
2+
3+
Frontend
4+
========
5+
6+
SyncMaster provides a `Frontend (UI) <https://github.com/MobileTeleSystems/syncmaster-ui>`_ based on `React <https://react.dev/>`_,
7+
providing users the ability to create, update, delete entitities.
8+
9+
Install & run
10+
-------------
11+
12+
With Docker
13+
~~~~~~~~~~~
14+
15+
* Install `Docker <https://docs.docker.com/engine/install/>`_
16+
* Install `docker-compose <https://github.com/docker/compose/releases/>`_
17+
18+
* Run the following command:
19+
20+
.. code:: console
21+
22+
$ docker compose --profile frontend up -d --wait
23+
24+
``docker-compose`` will download SyncMaster UI image, create containers, and then start them.
25+
26+
Options can be set via ``.env`` file or ``environment`` section in ``docker-compose.yml``
27+
28+
.. dropdown:: ``docker-compose.yml``
29+
30+
.. literalinclude:: ../../../docker-compose.yml
31+
:emphasize-lines: 123-140
32+
33+
.. dropdown:: ``.env.docker``
34+
35+
.. literalinclude:: ../../../.env.docker
36+
:emphasize-lines: 49-50
37+
38+
* After frontend is started and ready, open http://localhost:3000.
39+
40+
See also
41+
--------
42+
43+
.. toctree::
44+
:maxdepth: 1
45+
46+
configuration

0 commit comments

Comments
 (0)