Skip to content

A SaaS application to exchange P2P services with Stripe payment gateway.

License

Notifications You must be signed in to change notification settings

yxsh16/Billing-System

Repository files navigation

Service-Exchange and Billing Platform

Built with Cookiecutter Django Black code style

A SaaS product for P2P service exchange and billing using Stripe payments.

🔧 Tech Stack Used:

  • Python
  • Django
  • Postgres
  • Docker
  • Ubuntu
  • AWS
  • Gunicorn
  • Celery
  • GitHub

Setup

This project is built using Cookiecutter Django.

Run:

docker compose up

Your application will start on localhost:8000.

Deployment

Requirements:

  • AWS account
  • AWS instance with minimum 2 GiB memory
  • A custom domain name

Steps:

  1. Launch the instance
  2. Configure the hosted zones from Route 53
  3. Configure the inbound rules (port 8000)

Installing Dependencies:

  1. Login to the server as the root user
  2. Follow the instructions step by step from here
  3. Run:
sudo apt install docker-ce docker-compose git
  1. Add your deploy keys from GitHub to the server
  2. Follow the instructions from GitHub
  3. Clone the GitHub repository to the server using SSH
  4. Create a new directory named .production
  5. Run:
vim /root/Billing-System/.envs/.production/.django

From your local codebase, copy all the content of the file /.envs/.production/.django and paste it in the newly created file using vim.

  1. Run:
vim /root/Billing-System/.envs/.production/.postgres

From your local codebase, copy all the content of the file /.envs/.production/.postgres and paste it in the newly created file using vim.

  1. Run:
cd /root/Billing-System && docker-compose -f production.yml down && git pull && docker-compose -f production.yml build && docker-compose -f production.yml run --rm django python manage.py migrate && docker-compose -f production.yml up -d

The response should like: Screenshot 2024-03-26 134547

You can now visit your application on the configured domain name.

If the response on the terminal looks like theScreenshot 2024-03-26 134026 n the resources provisioned to the instance are not enough, and you will need to upgrade the memory size to at least 2 GiB (works fine).

About

A SaaS application to exchange P2P services with Stripe payment gateway.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published