Git Product home page Git Product logo

docker-boxbilling's Introduction

BoxBilling on Docker - Step by Step

Here we will document everything required to run BoxBilling on Docker. TLDR; Jump to Running Prebuild Installation section to get this docker run on your machine.

Prerequisites

  • Docker Desktop or Docker CLI with Docker Compose installed. Follow this instructions to have Docker on your machine.
  • An account on BoxBilling for acquiring product key and download application. Register one here if you don't have one already.

Step by Step BoxBilling on Docker Creation

  • Download BoxBilling latest release and while downloading get your license key here
  • Make a folder named boxbilling and extract downloaded BoxBilling into public folder inside
  • Copy bb-config-sample.php to bb-config.php
  • change bb-config,php
from :
    'url'     => 'http://localhost/',
to :
    'url'     => 'http://localhost:8004/',
  • Create .env file inside public folder and fill with
    DB_HOST=db
    DB_NAME=boxbilling
    DB_USER=root
    DB_PASS=myboxbilling
  • Make docker-config folder on the project root, and add nginx, php, and mysql folders inside. These folders willl contains regular config files for Nginx, PHP, and mySQL. Some config files will be copied to docker image and other will be read anytime Docker Compose started up.

  • Create docker-compose.yml, this is the server configuration file that will define containers and network configuration for our docker stack.

  • Create docker-compose-nginx-dockerfile for Nginx image builder.

  • Create docker-compose-php-dockerfile for PHP image builder.

  • Create docker-compose-mysql-dockerfile for mySQL image builder.

  • Create 01.sql file inside docker-config/mysql/init that will contain initial seeder for the database. This file will be run when we build our mysql container.

  • Now run docker-compose-up and let docker build images and containers.

  • Once containers up and ready go to (http://localhost:8004/install/).

  • On preparation tab, ensure if all prerequisites are labeled with green, check agree and press NEXT.

  • On database tab enter all fields with all of our credetials above.

  • On Administrator tab fill in all fields. For example, our installation values are:

    NAME : Administrator
    Email : [email protected]
    Password : MyBoxbilling
  • Installation are done and we should remove /var/www/public/install folder, change /var/www/public/bb-config.php to readonly (CHMOD 644), and setup cron job */5 * * * * php /var/www/public/bb-cron.php on our webserver docker entrypoint.
  • To check on installation go to http://localhost:8004/bb-admin/staff/login for administrator login or to http://localhost:8004/ to enter client area.

Running Prebuild Installation

  • Clone this repository into boxbilling folder
  • Make necessary server config changes on docker-config folder
  • Make necessary config changes on public/bb-config.php and public/.env files
  • Copy your own boxbilling SQL data to docker-config/mysql/mysql-seeder.sql or you can leave it as is
  • Go back to boxbilling folder and run docker compose up -d
  • First run will a bit long because we are building docker images and seed our initial database. But subsequence run will be fast.
  • Now browse to (http://localhost:8004) to check our BoxBilling app, or to (http://localhost:8004/bb-admin) to enter BoxBilling admin console
  • For testing please login using this credentials:
    Email : [email protected]
    Password : MyBoxbilling

Side Notes

  • To reset mysql docker databases and inject a new one, you can use command docker-compose down -v
  • Building docker images from scratch is not considered as best practice, as using official prebuild Docker images will fasten Docker development time and reduce the probability of server misconfigurations.

docker-boxbilling's People

Contributors

andynr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.