diff --git a/docs/001-installation/quick-install-with-docker.rst b/docs/001-installation/quick-install-with-docker.rst index 64e460169..5689d7c93 100644 --- a/docs/001-installation/quick-install-with-docker.rst +++ b/docs/001-installation/quick-install-with-docker.rst @@ -1,4 +1,4 @@ -.. _quick-install: +.. _quick-install-docker: ========================= Quick Install with Docker @@ -61,11 +61,11 @@ Copy the following code and paste it into a file called `docker-compose.yaml` #. Inside the docker-compose.yaml file, edit the SECRET_KEY. This will be a large string with symbols, letters and -numbers. You can use a generate like https://djecrety.ir/ + numbers. You can use a generate like https://djecrety.ir/ #. Inside the docker-compose.yaml file, fill out the following fields appropriately. SMTP is used to send the reset -password functionality required to login for the first time. + password functionality required to login for the first time. - SMTP_EMAIL_HOST - SMTP_EMAIL_PORT @@ -74,15 +74,15 @@ password functionality required to login for the first time. #. The administration username/email will be used to log into NearBeach. This will need to be filled out appropriately -because changing + because changing - ADMIN_USERNAME - ADMIN_EMAIL #. Inside the docker-compose.yaml file, there are two services. One will be for setting up the Database, and the other -service will setup NearBeach. You will need to fill out the database connection/details. Please note you will need the -same variable value for the following pairs; + service will setup NearBeach. You will need to fill out the database connection/details. Please note you will need the + same variable value for the following pairs; - DB_DATABASE / MARIADB_DATABASE - DB_USER / MARIADB_USER @@ -120,7 +120,7 @@ same variable value for the following pairs; #. Use your Azure Blob storage to store uploaded files from NearBeach. If you don't require Azure Blob storage, please -delete these two lines; + delete these two lines; .. code-block:: bash @@ -129,10 +129,31 @@ delete these two lines; #. Using a terminal, change directory to the location that you stored the docker-compose file. Run the following -command: `docker-compose up -d`. If you would like to specify a project name for your NearBeach instance. Run the -following command instead: `docker-compose up -d --project-name NearBeach`. + command + + .. code-block:: bash + + docker-compose up -d + + If you would like to specify a project name for your NearBeach instance. Run the following command instead: + + .. code-block:: bash + + docker-compose up -d --project-name NearBeach You are now up and running NearBeach in Docker. Visiting the URL you set in the `CSRF_TRUSTED_URLS` in your browser will -take you to NearBeach. For first time logins, you will need to reset your password. Clicking "Reset" password and -filling out your email will send you a password reset. \ No newline at end of file +take you to NearBeach. + +For first time logins, you will need to reset your password. There are two different methods. + +#. Clicking "Reset" password and filling out your email will send you a password reset. + +#. Using a terminal, run the following command: + + .. code-block:: bash + + docker exec -it <> python3 ./manage.py changepassword <> + + + This will ask for a new password. diff --git a/docs/001-installation/quick-install-with-podman.rst b/docs/001-installation/quick-install-with-podman.rst new file mode 100644 index 000000000..64005c09e --- /dev/null +++ b/docs/001-installation/quick-install-with-podman.rst @@ -0,0 +1,160 @@ +.. _quick-install-podman: + +========================= +Quick Install with Podman +========================= + +Copy the following code and paste it into a file called `podman-compose.yaml` + +.. code-block:: bash + + version: '3' + + services: + db: + image: docker.io/mariadb:10.11 + container_name: nearbeach-db + ports: + - 3306:3306 + environment: + - MARIADB_DATABASE=<> + - MARIADB_USER=<> + - MARIADB_PASSWORD=<> + - MARIADB_ROOT_PASSWORD=<> + volumes: + - ./init:/docker-entrypoint-initdb.d + nearbeach: + image: docker.io/robotichead/nearbeach:latest + container_name: nearbeach + environment: + - SECRET_KEY=<> + - SMTP_EMAIL_HOST=<> + - SMTP_EMAIL_PORT=<> + - SMTP_EMAIL_HOST_USER=<> + - SMTP_EMAIL_HOST_PASSWORD=<> + - DB_DATABASE=<> + - DB_USER=<> + - DB_PASSWORD=<> + - DB_HOST=nearbeach-db + - DB_ENGINE=mysql + - DB_PORT=3306 + - ADMIN_USERNAME=<> + - ADMIN_EMAIL=<> + - CSRF_TRUSTED_URLS=<> + - ALLOWED_HOSTS=localhost,127.0.0.1 + - AZURE_STORAGE_CONNECTION_STRING=<> + - AZURE_STORAGE_CONTAINER_NAME=<> + volumes: + - .:/ceansuite + ports: + - 8000:8000 + - 2525:2525 + command: > + sh -c "python manage.py wait_for_database && + ls -al && + python manage.py migrate && + python manage.py initadmin && + python manage.py runserver 0.0.0.0:8000" + restart: unless-stopped + depends_on: + - db + + +#. Inside the podman-compose.yaml file, edit the SECRET_KEY. This will be a large string with symbols, letters and + numbers. You can use a generate like https://djecrety.ir/ + + +#. Inside the podman-compose.yaml file, fill out the following fields appropriately. SMTP is used to send the reset + password functionality. This is one of the methods required to login for the first time. + + - SMTP_EMAIL_HOST + - SMTP_EMAIL_PORT + - SMTP_EMAIL_HOST_USER + - SMTP_EMAIL_HOST_PASSWORD + + +#. The administration username/email will be used to log into NearBeach. This will need to be filled out appropriately + because changing + + - ADMIN_USERNAME + - ADMIN_EMAIL + + +#. Inside the podman-compose.yaml file, there are two services. One will be for setting up the Database, and the other + service will setup NearBeach. You will need to fill out the database connection/details. Please note you will need the + same variable value for the following pairs; + + - DB_DATABASE / MARIADB_DATABASE + - DB_USER / MARIADB_USER + - DB_PASSWORD / MARIADB_PASSWORD + - MARIADB_ROOT_PASSWORD + + MARIADB_ROOT_PASSWORD will not have a pair. + + +#. Fill out the CSRF_TRUSTED_URLS value. This will need to be the EXACT domain. Please view the examples below + + .. code-block:: bash + + CSRF_TRUSTED_URLS=https://demo.nearbeach.org + + If you would like to demo NearBeach, please fill out the following + + .. code-block:: bash + + CSRF_TRUSTED_URLS=http://localhost:8000,http://127.0.0.1:8000 + +#. Fill out the ALLOWED_HOSTS. This will be similar to the CSRF_TRUSTED, but without the http and port numbers. + + .. code-block:: bash + + - ALLOWED_HOST=demo.nearbeach.org + + + Alternatively - if using localhost + + + .. code-block:: bash + + - ALLOWED_HOSTS=localhost,127.0.0.1 + + +#. Use your Azure Blob storage to store uploaded files from NearBeach. If you don't require Azure Blob storage, please + delete these two lines; + + .. code-block:: bash + + - AZURE_STORAGE_CONNECTION_STRING + - AZURE_STORAGE_CONTAINER_NAME + + +#. Using a terminal, change directory to the location that you stored the podman-compose file. Run the following + command: + + .. code-block:: bash + + podman-compose up -d + + If you would like to specify a project name for your NearBeach instance. Run the + following command instead: + + .. code-block:: bash + + podman-compose up -d --project-name NearBeach + + +You are now up and running NearBeach in Docker. Visiting the URL you set in the `CSRF_TRUSTED_URLS` in your browser will +take you to NearBeach. + +For first time logins, you will need to reset your password. There are two different methods. + +#. Clicking "Reset" password and filling out your email will send you a password reset. + +#. Using a terminal, run the following command: + + .. code-block:: bash + + podman exec -it <> python3 ./manage.py changepassword <> + + + This will ask for a new password. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index d964cee79..ed95dd414 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -45,6 +45,7 @@ Welcome to NearBeach. We are a small community of developers trying to make tool :caption: 💡 Installation Quick Install with Docker + Quick Install with Podman Different Databases Different Blob Storage Old Installation Process