added codebase, project rules and sec audit
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
Use AWS S3 Storage
|
||||
##################
|
||||
|
||||
.. note::
|
||||
|
||||
It is assumed that you have an AWS account.
|
||||
|
||||
NearBeach uses Boto3 to connect to AWS. To find more information about Boto3 please go to `their documentation <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html>`_
|
||||
|
||||
AWS S3 Instructions
|
||||
===================
|
||||
|
||||
Modify your docker-compose file to include the fields
|
||||
|
||||
* AWS_ACCESS_KEY_ID
|
||||
* AWS_SECRET_ACCESS_KEY
|
||||
* AWS_STORAGE_BUCKET_NAME
|
||||
|
||||
The following is an example snippet of code
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
...
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
- SECRET_KEY=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST=<<Please fill>>
|
||||
- SMTP_EMAIL_PORT=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_USER=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_PASSWORD=<<Please fill>>
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=nearbeach-db
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=3306
|
||||
- ADMIN_USERNAME=<<Please fill>>
|
||||
- ADMIN_EMAIL=<<Please fill>>
|
||||
- CSRF_TRUSTED_URLS=<<https://yourdomain.com.au>>
|
||||
- AWS_ACCESS_KEY_ID=<<Please fill>>
|
||||
- AWS_SECRET_ACCESS_KEY=<<Please fill>>
|
||||
- AWS_STORAGE_BUCKET_NAME=<<Please fill>>
|
||||
volumes:
|
||||
...
|
||||
|
||||
Please follow `AWS' guild on setting up S3 IAM credentials <https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-policies-s3.html>`_
|
||||
|
||||
AWS Storage Bucket Name can be grabbed from the S3 bucket when creating (or after).
|
||||
@@ -0,0 +1,51 @@
|
||||
Use Azure Blob Storage
|
||||
######################
|
||||
|
||||
.. note::
|
||||
|
||||
It is assumed that you have an Azure account.
|
||||
|
||||
NearBeach uses Azure's own toolset to connect to Azure Blob storage. `For more information please visit Microsoft's documentation <https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python>`_
|
||||
|
||||
Azure Blob Instructions
|
||||
=======================
|
||||
|
||||
Modify your docker-compose file to include the fields
|
||||
|
||||
* AZURE_STORAGE_CONNECTION_STRING
|
||||
* AZURE_STORAGE_CONTAINER_NAME
|
||||
|
||||
The following is an example snippet of code
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
...
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
- SECRET_KEY=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST=<<Please fill>>
|
||||
- SMTP_EMAIL_PORT=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_USER=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_PASSWORD=<<Please fill>>
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=nearbeach-db
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=3306
|
||||
- ADMIN_USERNAME=<<Please fill>>
|
||||
- ADMIN_EMAIL=<<Please fill>>
|
||||
- CSRF_TRUSTED_URLS=<<https://yourdomain.com.au>>
|
||||
- AZURE_STORAGE_CONNECTION_STRING=<<Please fill>>
|
||||
- AZURE_STORAGE_CONTAINER_NAME=<<Please fill>>
|
||||
volumes:
|
||||
...
|
||||
|
||||
`How to get Storage Connection String <https://learn.microsoft.com/en-us/azure/storage/common/storage-account-get-info?tabs=portal>`_
|
||||
|
||||
The Azure Storage container name is the Azure storage container.
|
||||
@@ -0,0 +1,18 @@
|
||||
Blob Storages
|
||||
#############
|
||||
|
||||
NearBeach requires BLOB storage to house any uploads like documents, profile pictures etc. These will be stored in the BLOB storage. You have the choice of the following;
|
||||
|
||||
* Azure Blob Storage
|
||||
* Aws S3 Buckets
|
||||
* Minio Buckets
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
:caption: Use Different Blob Storages
|
||||
|
||||
Azure Blob Storage </001-installation/different-blob-storage/azure>
|
||||
AWS S3 </001-installation/different-blob-storage/aws-s3>
|
||||
Minio </001-installation/different-blob-storage/minio>
|
||||
@@ -0,0 +1,58 @@
|
||||
Use Minio Blob Storage
|
||||
######################
|
||||
|
||||
.. note::
|
||||
|
||||
It is assumed that you have a Minio account.
|
||||
|
||||
NearBeach uses Boto3 to connect to Minio. To find more information about Boto3 please go to `their documentation <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html>`_
|
||||
|
||||
Mino Blob Instructions
|
||||
======================
|
||||
|
||||
Modify your docker-compose file to include the fields
|
||||
|
||||
* AWS_ACCESS_KEY_ID
|
||||
* AWS_SECRET_ACCESS_KEY
|
||||
* AWS_STORAGE_BUCKET_NAME
|
||||
* AWS_S3_ENDPOINT_URL
|
||||
|
||||
The following is an example snippet of code
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
...
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
- SECRET_KEY=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST=<<Please fill>>
|
||||
- SMTP_EMAIL_PORT=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_USER=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_PASSWORD=<<Please fill>>
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=nearbeach-db
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=3306
|
||||
- ADMIN_USERNAME=<<Please fill>>
|
||||
- ADMIN_EMAIL=<<Please fill>>
|
||||
- CSRF_TRUSTED_URLS=<<https://yourdomain.com.au>>
|
||||
- AWS_ACCESS_KEY_ID=<<Please fill>>
|
||||
- AWS_SECRET_ACCESS_KEY=<<Please fill>>
|
||||
- AWS_STORAGE_BUCKET_NAME=<<Please fill>>
|
||||
- AWS_S3_ENDPOINT_URL=<<Please fill>>
|
||||
volumes:
|
||||
...
|
||||
|
||||
|
||||
Please follow any Minio instructions on how to obtain the Access Key and Secret Access Key.
|
||||
|
||||
The storage bucket name should match the bucket name created in the minio client.
|
||||
|
||||
The S3 endpoint url is the API endpoint for minio. i.e. localhost:9000
|
||||
@@ -0,0 +1,22 @@
|
||||
Using Different Databases
|
||||
#########################
|
||||
|
||||
We built NearBeach on the back of Django - which supports multiple databases.
|
||||
|
||||
NearBeach's currently supported databases;
|
||||
|
||||
* MariaDb
|
||||
* MySQL
|
||||
* PostgreSQL
|
||||
* Oracle
|
||||
|
||||
If you require to use a different database, please follow the instructions linked below.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Use Different Databases
|
||||
|
||||
MariaDB </001-installation/different-databases/maria-db>
|
||||
MySQL </001-installation/different-databases/mysql>
|
||||
PostgreSQL </001-installation/different-databases/postgresql>
|
||||
Oracle </001-installation/different-databases/oracle>
|
||||
@@ -0,0 +1,74 @@
|
||||
Use MariaDb
|
||||
###########
|
||||
|
||||
You can use NearBeach with MariaDB. You can easily run MariaDB within the same docker-compose file, or alternatively you can run it separately (external).
|
||||
|
||||
Mariadb - External Database
|
||||
===========================
|
||||
|
||||
.. note::
|
||||
|
||||
We recommend using an external database like AWS RDS, etc. So you can scale and backup externally to the docker container.
|
||||
|
||||
Below is the sample code for using MariaDB/MySQL. Please note we do not have any of the docker database setup, as this is not required for externally run databases.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=<<please fill>>
|
||||
...
|
||||
|
||||
You will need to fill out the following fields. These fields should match how you would log into that database.
|
||||
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=<<please fill>>
|
||||
|
||||
|
||||
MariaDb - Docker Database
|
||||
=========================
|
||||
|
||||
.. note::
|
||||
|
||||
This will run the database within the docker environment.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.11
|
||||
container_name: nearbeach-db
|
||||
ports:
|
||||
- 3306:3306
|
||||
environment:
|
||||
- MARIADB_DATABASE=<<Please fill>>
|
||||
- MARIADB_USER=<<Please fill>>
|
||||
- MARIADB_PASSWORD=<<Please fill>>
|
||||
- MARIADB_ROOT_PASSWORD=<<Please fill>>
|
||||
volumes:
|
||||
- ./init:/docker-entrypoint-initdb.d
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
|
||||
The above code would be used in your docker-compose file.
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
Use MySQL
|
||||
#########
|
||||
|
||||
You can use NearBeach with MySQL. You can easily run MySQL within the same docker-compose file, or alternatively you can run it separately (external).
|
||||
|
||||
MySQL - External Database
|
||||
=========================
|
||||
|
||||
.. note::
|
||||
|
||||
We recommend using an external database like AWS RDS, etc. So you can scale and backup externally to the docker container.
|
||||
|
||||
Below is the sample code for using MySQL. Please note we do not have any of the docker database setup, as this is not required for externally run databases.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=<<please fill>>
|
||||
...
|
||||
|
||||
You will need to fill out the following fields. These fields should match how you would log into that database.
|
||||
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=<<please fill>>
|
||||
|
||||
MySQL - Docker Database
|
||||
=======================
|
||||
|
||||
.. note::
|
||||
|
||||
This will run the database within the docker environment.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql:8.0
|
||||
container_name: nearbeach-db
|
||||
ports:
|
||||
- 3306:3306
|
||||
environment:
|
||||
- MYSQL_DATABASE=<<Please fill>>
|
||||
- MYSQL_USER=<<Please fill>>
|
||||
- MYSQL_PASSWORD=<<Please fill>>
|
||||
- MYSQL_ROOT_PASSWORD=<<Please fill>>
|
||||
volumes:
|
||||
- ./init:/docker-entrypoint-initdb.d
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
|
||||
The above code would be used in your docker-compose file.
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
Use Oracle DB
|
||||
#############
|
||||
|
||||
You can use NearBeach with Oracle.
|
||||
|
||||
Oracle - External Database
|
||||
==========================
|
||||
|
||||
.. note::
|
||||
|
||||
We recommend using an external database like AWS RDS, etc. So you can scale and backup externally to the docker container. You will need to fill out the following fields. These fields should match how you would log into that database.
|
||||
|
||||
|
||||
Below is the sample code for using Oracle DB. Please note we do not have any of the docker database setup, as this is not required for externally run databases.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=oracle
|
||||
- DB_PORT=<<please fill>>
|
||||
...
|
||||
|
||||
You will need to fill out the following fields. These fields should match how you would log into that database.
|
||||
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=oracle
|
||||
- DB_PORT=<<please fill>>
|
||||
@@ -0,0 +1,75 @@
|
||||
Use PostgreSQL
|
||||
##############
|
||||
|
||||
You can use NearBeach with PostgreSQL. You can easily run PostgreSQL within the same docker-compose file, or alternatively you can run it separately (external).
|
||||
|
||||
PostgreSQL - External Database
|
||||
==============================
|
||||
|
||||
.. note::
|
||||
|
||||
We recommend using an external database like AWS RDS, etc. So you can scale and backup externally to the docker container. You will need to fill out the following fields. These fields should match how you would log into that database.
|
||||
|
||||
|
||||
Below is the sample code for using PostgreSQL. Please note we do not have any of the docker database setup, as this is not required for externally run databases.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=postgresql
|
||||
- DB_PORT=<<please fill>>
|
||||
...
|
||||
|
||||
You will need to fill out the following fields. These fields should match how you would log into that database.
|
||||
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=<<please fill>>
|
||||
- DB_ENGINE=postgresql
|
||||
- DB_PORT=<<please fill>>
|
||||
|
||||
|
||||
PostgreSQL - Docker Database
|
||||
============================
|
||||
|
||||
.. note::
|
||||
|
||||
This will run the database within the docker environment.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:latest
|
||||
container_name: nearbeach-db
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_DB=<<Please fill>>
|
||||
- POSTGRES_USER=<<Please fill>>
|
||||
- POSTGRES_PASSWORD=<<Please fill>>
|
||||
volumes:
|
||||
- ./db-data/:/var/lib/postgresql/data/
|
||||
- ./init:/docker-entrypoint-initdb.d
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
...
|
||||
|
||||
The above code would be used in your docker-compose file.
|
||||
|
||||
152
NearBeach/docs/001-installation/quick-install-with-docker.rst
Normal file
152
NearBeach/docs/001-installation/quick-install-with-docker.rst
Normal file
@@ -0,0 +1,152 @@
|
||||
.. _quick-install-docker:
|
||||
|
||||
Quick Install with Docker
|
||||
#########################
|
||||
|
||||
Copy the following code and paste it into a file called `docker-compose.yaml`
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.11
|
||||
container_name: nearbeach-db
|
||||
ports:
|
||||
- 3306:3306
|
||||
environment:
|
||||
- MARIADB_DATABASE=<<Please fill>>
|
||||
- MARIADB_USER=<<Please fill>>
|
||||
- MARIADB_PASSWORD=<<Please fill>>
|
||||
- MARIADB_ROOT_PASSWORD=<<Please fill>>
|
||||
volumes:
|
||||
- ./init:/docker-entrypoint-initdb.d
|
||||
nearbeach:
|
||||
image: robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
- SECRET_KEY=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST=<<Please fill>>
|
||||
- SMTP_EMAIL_PORT=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_USER=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_PASSWORD=<<Please fill>>
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=nearbeach-db
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=3306
|
||||
- ADMIN_USERNAME=<<Please fill>>
|
||||
- ADMIN_EMAIL=<<Please fill>>
|
||||
- CSRF_TRUSTED_URLS=<<https://yourdomain.com.au>>
|
||||
- ALLOWED_HOSTS=localhost,127.0.0.1
|
||||
- AZURE_STORAGE_CONNECTION_STRING=<<Please fill>>
|
||||
- AZURE_STORAGE_CONTAINER_NAME=<<Please fill>>
|
||||
volumes:
|
||||
- .:/ceansuite
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 2525:2525
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
|
||||
#. 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/
|
||||
|
||||
|
||||
#. 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.
|
||||
|
||||
- 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 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;
|
||||
|
||||
- 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 docker-compose file. Run the following
|
||||
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. 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 <<DOCKER-CONTAINER-NAME>> python3 ./manage.py changepassword <<ADMIN_USERNAME>>
|
||||
|
||||
|
||||
This will ask for a new password.
|
||||
151
NearBeach/docs/001-installation/quick-install-with-podman.rst
Normal file
151
NearBeach/docs/001-installation/quick-install-with-podman.rst
Normal file
@@ -0,0 +1,151 @@
|
||||
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=<<Please fill>>
|
||||
- MARIADB_USER=<<Please fill>>
|
||||
- MARIADB_PASSWORD=<<Please fill>>
|
||||
- MARIADB_ROOT_PASSWORD=<<Please fill>>
|
||||
volumes:
|
||||
- ./init:/docker-entrypoint-initdb.d
|
||||
nearbeach:
|
||||
image: docker.io/robotichead/nearbeach:latest
|
||||
container_name: nearbeach
|
||||
environment:
|
||||
- SECRET_KEY=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST=<<Please fill>>
|
||||
- SMTP_EMAIL_PORT=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_USER=<<Please fill>>
|
||||
- SMTP_EMAIL_HOST_PASSWORD=<<Please fill>>
|
||||
- DB_DATABASE=<<Please fill>>
|
||||
- DB_USER=<<Please fill>>
|
||||
- DB_PASSWORD=<<Please fill>>
|
||||
- DB_HOST=nearbeach-db
|
||||
- DB_ENGINE=mysql
|
||||
- DB_PORT=3306
|
||||
- ADMIN_USERNAME=<<Please fill>>
|
||||
- ADMIN_EMAIL=<<Please fill>>
|
||||
- CSRF_TRUSTED_URLS=<<https://yourdomain.com.au>>
|
||||
- ALLOWED_HOSTS=localhost,127.0.0.1
|
||||
- AZURE_STORAGE_CONNECTION_STRING=<<Please fill>>
|
||||
- AZURE_STORAGE_CONTAINER_NAME=<<Please fill>>
|
||||
volumes:
|
||||
- .:/ceansuite
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 2525:2525
|
||||
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 <<PODMAN-CONTAINER-NAME>> python3 ./manage.py changepassword <<ADMIN_USERNAME>>
|
||||
|
||||
|
||||
This will ask for a new password.
|
||||
Reference in New Issue
Block a user