Skip to content

abdolnabi/ibillding.jango

Repository files navigation

Version

iBillding

Table of contents

Intro

iBillding is a Building Charge Management system.

Development

  • Using Django stack.

Contributors

Testing

  • No tests so far

CI/CD

Application is using GitHub Actions for CI/CD. In order to config it for future use we have to set multiple secrets which are located in staging.yml including password-less SSH_PRIVATE_KEY which should be generated using following command:

ssh-keygen -m PEM -t rsa -b 4096

For more info look into guideline of action packages like easingthemes/ssh-deploy or appleboy/ssh-action.

Deployment

Staging

  1. Clone the repo

  2. Install Gunicorn, MySQL 5.7+, NPM

  3. Create a user with secret as password in MySQL and % as Host (NOTE that to set host properlsy for security reasons ). Then create a DB like billding.

MySQL> CREATE USER 'user'@'%' IDENTIFIED BY 'secret';
MySQL> CREATE DATABASE `billding`;
MySQL> GRANT ALL PRIVILEGES ON `billding`.* to 'user'@'localhost' IDENTIFIED BY 'secret';
MYSQL> ALTER USER 'user'@'%' IDENTIFIED WITH mysql_native_password BY 'secret';
MySQL> FLUSH PRIVILEGES;
  1. Copy .env.example to .env and set variables.

  2. Run

root@terminal$ apt install libpq-dev
root@terminal$ apt install default-libmysqlclient-dev
root@terminal$ apt install python3-pip
root@terminal$ pip3 install django-admin
root@terminal$ pip3 install -r requirements.txt
root@terminal$ python3 bcm/manage.py migrate --noinput
root@terminal$ npm install
root@terminal$ python3 bcm/manage.py collectstatic --noinput
root@terminal$ cp -rf node_modules bcm/staticfiles
  1. Then run the application with:
root@terminal$ gunicorn3 bcm.wsgi:application --chdir bcm --bind 0.0.0.0:80 --workers=1 --daemon

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors