From 777c9c1c0d7b53912903c5935009d4b05fe5e982 Mon Sep 17 00:00:00 2001 From: nalvarez508 Date: Fri, 3 Mar 2023 14:04:56 -0800 Subject: [PATCH 1/4] Add docker-compose instructions - define a compose file - separate CLI vs compose --- source/installing-docker.rst | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/source/installing-docker.rst b/source/installing-docker.rst index 069840e..62c11f6 100644 --- a/source/installing-docker.rst +++ b/source/installing-docker.rst @@ -7,6 +7,8 @@ We recommend using *latest* as it contains everything you will need to get serve Creating the container ---------------------- +**Via command line** + To create the container, start it, and add the default user: .. code-block:: bash @@ -16,9 +18,43 @@ To create the container, start it, and add the default user: $ docker create --name pufferpanel -p 8080:8080 -p 5657:5657 -v pufferpanel-config:/etc/pufferpanel -v /var/lib/pufferpanel:/var/lib/pufferpanel -v /var/run/docker.sock:/var/run/docker.sock --restart=on-failure pufferpanel/pufferpanel:latest $ docker start pufferpanel $ docker exec -it pufferpanel /pufferpanel/pufferpanel user add - + And you're done. Your panel is now accessible at http://localhost:8080 +**Via Docker Compose** + +You will need the Docker Compose plugin installed on your system. + +Create the Pufferpanel directory: + +.. code-block:: bash + $ mkdir -p /var/lib/pufferpanel + +Create the following ``docker-compose.yml`` file which defines the Pufferpanel service, including its ports and volume mappings. This is equivalent to the command line setup above. + +.. code-block:: yml + + version: '3.2' + services: + pufferpanel: + image: pufferpanel/pufferpanel:latest # See "Tags" for other images + restart: on-failure + ports: + - 8080:8080 # XXXX:8080, where XXXX on the outside will be sent to 8080 inside the container + - 5657:5657 # YYYY:5657 + volumes: + - ./pufferpanel-config:/etc/pufferpanel + - /var/lib/pufferpanel:/var/lib/pufferpanel + - /var/run/docker.sock:/var/run/docker.sock + +Start the container and add the default user: + +.. code-block:: bash + $ docker compose up -d + $ docker exec -it pufferpanel /pufferpanel/pufferpanel user add + +And you're done. Your panel is now accessible at http://localhost:XXXX (where XXXX is 8080 as defined above). + Understanding the config ------------------------ From f2599bb2a81081eb89883edc20b5efcaca4cce5c Mon Sep 17 00:00:00 2001 From: nalvarez508 Date: Fri, 3 Mar 2023 14:06:33 -0800 Subject: [PATCH 2/4] Formatting code blocks, slight clarity --- source/installing-docker.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/installing-docker.rst b/source/installing-docker.rst index 62c11f6..060439d 100644 --- a/source/installing-docker.rst +++ b/source/installing-docker.rst @@ -28,6 +28,7 @@ You will need the Docker Compose plugin installed on your system. Create the Pufferpanel directory: .. code-block:: bash + $ mkdir -p /var/lib/pufferpanel Create the following ``docker-compose.yml`` file which defines the Pufferpanel service, including its ports and volume mappings. This is equivalent to the command line setup above. @@ -40,7 +41,7 @@ Create the following ``docker-compose.yml`` file which defines the Pufferpanel s image: pufferpanel/pufferpanel:latest # See "Tags" for other images restart: on-failure ports: - - 8080:8080 # XXXX:8080, where XXXX on the outside will be sent to 8080 inside the container + - 8080:8080 # XXXX:8080, where port XXXX on the outside (host) will be sent to 8080 inside the container - 5657:5657 # YYYY:5657 volumes: - ./pufferpanel-config:/etc/pufferpanel @@ -50,6 +51,7 @@ Create the following ``docker-compose.yml`` file which defines the Pufferpanel s Start the container and add the default user: .. code-block:: bash + $ docker compose up -d $ docker exec -it pufferpanel /pufferpanel/pufferpanel user add From 577c4573a107cc1fe3876b48c04c554761fc0bef Mon Sep 17 00:00:00 2001 From: Nick Alvarez <48071045+nalvarez508@users.noreply.github.com> Date: Fri, 3 Mar 2023 14:10:20 -0800 Subject: [PATCH 3/4] Add a horiz. rule between two methods of install --- source/installing-docker.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/installing-docker.rst b/source/installing-docker.rst index 060439d..101704e 100644 --- a/source/installing-docker.rst +++ b/source/installing-docker.rst @@ -21,6 +21,8 @@ To create the container, start it, and add the default user: And you're done. Your panel is now accessible at http://localhost:8080 +---- + **Via Docker Compose** You will need the Docker Compose plugin installed on your system. From db452f9a77fda1e193f528154410311682a68902 Mon Sep 17 00:00:00 2001 From: nalvarez508 Date: Mon, 6 Mar 2023 19:43:03 -0800 Subject: [PATCH 4/4] Modify volume declarations - remove host binding for puff-config - add a named volume for puff-config - mapped named volume to /etc/pufferpanel --- source/installing-docker.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/installing-docker.rst b/source/installing-docker.rst index 101704e..5511d4d 100644 --- a/source/installing-docker.rst +++ b/source/installing-docker.rst @@ -46,9 +46,13 @@ Create the following ``docker-compose.yml`` file which defines the Pufferpanel s - 8080:8080 # XXXX:8080, where port XXXX on the outside (host) will be sent to 8080 inside the container - 5657:5657 # YYYY:5657 volumes: - - ./pufferpanel-config:/etc/pufferpanel + - pufferpanel-config:/etc/pufferpanel - /var/lib/pufferpanel:/var/lib/pufferpanel - /var/run/docker.sock:/var/run/docker.sock + + volumes: + pufferpanel-config: # Creates a named volume, referenced above + external: false Start the container and add the default user: