-
Notifications
You must be signed in to change notification settings - Fork 12
install remotedb
If you plan to use remote database please follow the instructions. An example using DigitalOcean Managed database is below:
Please note that reNgine-ng is tested and built on top of postgreSQL database. I can not guarantee if reNgine-ng works with other database. If you gave it a try and did work, please let me know, I'll update this section.
Please carry out these steps before installing reNgine-ng
Create a database cluster.
- Login to your digitalocean account and click on Databases on left navigation menu.
- Click on Create Database Cluster button.
- Choose PostgreSQL
- Click on Create Database Cluster button.
- Click on Get Started.
- Choose your inbound connection to the database cluster. This must be either VPS IP address or IP address of your local machine wherever reNgine-ng is running.
- Note down your credentials, you'll need to put these details in .env file. Also, if your managed database only connects via SSL, please click on Download CA certificate.
-
Finish the steps.
-
Now you have a managed database cluster, and you need these credentials to put it in .env file.
Sample .env file with managed database cluster credentials
COMPOSE_PROJECT_NAME=rengine
AUTHORITY_NAME=reNgine-ng
AUTHORITY_PASSWORD=nSrmNkwT
COMPANY=reNgine-ng
DOMAIN_NAME=recon.example.com
COUNTRY_CODE=US
STATE=Georgia
CITY=Atlanta
POSTGRES_DB=defaultdb
POSTGRES_USER=doadmin
POSTGRES_PASSWORD=sfga69d121960is9cs9kc
POSTGRES_PORT=5432
POSTGRES_HOST=db-postgresql-nyc3-XXXXX-do-user-8362215-0.b.db.ondigitalocean.com
MIN_CONCURRENCY=5
MAX_CONCURRENCY=30
That is all you need, You should now be able to connect to the database from reNgine-ng, But, if you databases uses SSL connection, there is an extra step to be done.
- Move your CA certificate to reNgine-ng's web root directory
cd rengine-ng/web && mv ~/Downloads/ca-certificate.crt .
- Open reNgine-ng settings.py file inside rengine-ng/web/reNgine-ng
Find this line
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ.get('POSTGRES_DB'),
'USER': os.environ.get('POSTGRES_USER'),
'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
'HOST': os.environ.get('POSTGRES_HOST'),
'PORT': os.environ.get('POSTGRES_PORT'),
# 'OPTIONS':{
# 'sslmode':'verify-full',
# 'sslrootcert': os.path.join(BASE_DIR, 'ca-certificate.crt')
# }
}
}
and uncomment OPTIONS as below.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ.get('POSTGRES_DB'),
'USER': os.environ.get('POSTGRES_USER'),
'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
'HOST': os.environ.get('POSTGRES_HOST'),
'PORT': os.environ.get('POSTGRES_PORT'),
'OPTIONS':{
'sslmode':'verify-full',
'sslrootcert': os.path.join(BASE_DIR, 'ca-certificate.crt')
}
}
}
Now you can continue with Quick Installation or Detailed Installation Instructions
- Home - Introduction to reNgine-ng with workflows and features
- Installation - Install reNgine-ng in different ways
- Usage - Common usage and best practices
- Backup-Restore - Backup and restore reNgine-ng easily
- Dependencies - Information about used third-party libraries and tools
- Security - Security best practices and reporting issues
- Support - Troubleshooting guide and common issues
- Changelog - Complete changelog
- Community - Get help on social networks
- Contributing - How to contribute to the project
- Presentations - Materials regarding reNgine presented at conferences
- Screenshots - Collection of screenshots demonstrating features