diff --git a/source/user_guide/run_locally.rst b/source/user_guide/run_locally.rst index 9ae531fe5a9dfd4e29863034e9c82bb96856e2f0..7b0719de68a6f6d36d7758c4cbf9d0dead4ad36d 100644 --- a/source/user_guide/run_locally.rst +++ b/source/user_guide/run_locally.rst @@ -10,20 +10,20 @@ How it works .. note:: - You need to install on your machine `Docker <https://docs.docker.com/desktop/>`_ and `docker-compose <https://docs.docker.com/compose/install/>`_ + You need to install `Docker <https://docs.docker.com/desktop/>`_ on your computer. -Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. +Docker Compose (lately named Compose) is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. In this use case, Compose is used with only one container but permits to launch shiny-server in order to help you to develop your shiny app under construction. -Below, the content of ``docker-compose.yaml`` file. This file contains dedicated options to run the docker container with shiny-server service taking into account volume and port options. +Below, the content of ``docker-compose.yaml`` file. This file contains dedicated options to run the docker container with shiny-k8s-toolkit service taking into account volume and port options. -.. tabs:: Docker-compose +.. tabs:: Docker Compose .. code-tab:: yaml :caption: R @@ -33,7 +33,7 @@ Below, the content of ``docker-compose.yaml`` file. This file contains dedicated version: '3.4' services: - shiny-server: + shiny-k8s-toolkit: build: context: . user: 'shiny:shiny' @@ -50,7 +50,7 @@ Below, the content of ``docker-compose.yaml`` file. This file contains dedicated version: '3.4' services: - shiny-server: + shiny-k8s-toolkit: build: context: . command: [ @@ -71,25 +71,25 @@ Below, the content of ``docker-compose.yaml`` file. This file contains dedicated - '3838:3838' -.. tabs:: Docker-compose +.. tabs:: Docker Compose .. tab:: R .. note:: - Your are free to change/modify folder name. Don't forget to put your name at line 8. + Your are free to change/modify folder name, if so don't forget to put your name at line 8. .. tab:: Python .. note:: - | Your are free to change/modify folder name. Don't forget to put your name at line 8. + | Your are free to change/modify folder name, if so don't forget to put your name at line 18. | Don't forget also to addapt the file name of you app at line 14. Here, we assume that your app is in the file named ``app.py`` -We described only some options used in the ``docker-compose`` file. If you want to learn more, please see `official documentation <https://docs.docker.com/compose/>`_ +We described only some options used in the ``docker-compose.yaml`` file. If you want to learn more, please see `official documentation <https://docs.docker.com/compose/>`_ Volumes @@ -125,13 +125,13 @@ This folder have to be writable by the user ``shiny``, so simply allows everyone Port ***** -Port option permits to specify the ``HOST PORT`` and the ``CONTAINER PORT`` used for teh shiny-server service. +Port option permits to specify the ``HOST PORT`` and the ``CONTAINER PORT`` used for the shiny-k8s-toolkit service. Here, we use the same port **3838** in the both case. Command ********** -| **Only for Python**, the file contains also ``command`` instruction (lines 6 at 15) in order to reload the shiny-server after modification in your script. +| **Only for Python**, the file contains also ``command`` instruction (lines 6 at 15) in order to restart the shiny server after modification in your script. | The '--reload' option is native by default for R language in the shinyApp function and in shiny-server configuration. @@ -154,9 +154,9 @@ One command line is enough. .. code-block:: bash - docker-compose up --build + docker compose up --build -| This command line build the docker image in a container, run the container with several parameters like port and volume, who permits to launch teh shiny-server and test your shiny app. +| This command line build the docker image in a container, run the container with several parameters like port and volume, which permits to launch the shiny-k8s-toolkit service and test your shiny app. | You can modify locally your script in your favorite IDE and see immediately ( after refresh your navigator), the changes in your app. | In order to access to your app, you can launch `0.0.0.0:3838 <http://0.0.0.0:3838>`_ in your navigator. @@ -171,7 +171,7 @@ One command line is enough. Administrate your container ------------------------------ -By default, the name of the image build by ``docker-compose`` command depends of the project and the service name (Services are built once and then tagged, by default as ``project_service`` .) +By default, the name of the image build by ``docker-compose.yaml`` command depends of the project and the service name (Services are built once and then tagged, by default as ``project_service`` .) See details `docker compose build <https://docs.docker.com/engine/reference/commandline/compose_build/>`_ @@ -181,7 +181,7 @@ Some usefull command line : .. code-block:: bash - docker-compose up --build -d + docker compose up --build -d * **View the status of the containers :** @@ -201,14 +201,14 @@ Or .. code-block:: bash - docker-compose stop + docker compose stop * **Stop and remove containers :** .. code-block:: bash - docker-compose down + docker compose down * **Remove old builds :** diff --git a/source/user_guide/setup_project.rst b/source/user_guide/setup_project.rst index ac855df59e2986e3b998bd6ddf2d85ebb5c0b053..db18e881e6d0e371d205c3c9ecf92d64cb137be8 100644 --- a/source/user_guide/setup_project.rst +++ b/source/user_guide/setup_project.rst @@ -96,7 +96,7 @@ You also have to update the ``docker-compose`` file, in ``volume`` instruction, :emphasize-lines: 5-6 services: - shiny-server: + shiny-k8s-toolkit: build: ... volumes: - - ./my_project:/srv/shiny-server/