Skip to content

Installation

Arthur Beaulieu edited this page Jan 23, 2023 · 3 revisions

In order to run an instance on your system, you need to install docker, docker-compose and npm on your system. Once those dependencies are installed, you need to ask yourself what kind of instance you want to run ; is it a development environment, or a production one. If production, will it be only on localhost, or globally available. Before digging into the installation process, make sure you've read the wiki entry about the management script. Now that you are all clear about how you will install BeerCrackerz, let's see how to proceed.

Here is how the BeerCrackerz application works : it relies on an .env (created with bc.sh) that defines how to create and run the docker containers. When this file is defined, docker images must be fetched and built using those parameters. The app is then good to go live.

Whichever type of environment you want to setup, please first run the two following commands :

  • $ git clone https://github.com/MesseBasseProduction/BeerCrackerz to clone the source code on your system
  • # chmod +x ./bc.sh to give the managment script execution permission :

Development installation

Aside from installing docker, docker-compose and npm, the development environment is pretty straightforward to build, run the following :

  • $ ./bc.sh -i dev to setup the associated environment file
  • $ ./bc.sh -b dev to build BeerCrackerz docker images
  • $ ./bc.sh -s dev to start the application
  • $ docker exec -it beer_crackerz_back python manage.py createsuperuser to create the super user
  • $ npm run watch to look for changes in .js and .scss files

Production installation

As we mentionned previously, there are two ways to build a BeerCrackerz production environment ; local or not. Let's first see how to install BeerCrackerz to run on a production environment globally available.

Standard production

For a standard production, you must ensure that, aside from installing docker, docker-compose and npm, you also have a domain availabe (and access to its DNS records), a functionnal mail address and both a MailJet API key* and a MailJet API secret*. Those information will be asked when installing BeerCrackerz using managment script, run the following :

  • $ ./bc.sh -i prod to setup the associated environment file
  • $ ./bc.sh -b prod to build BeerCrackerz docker images
  • $ ./bc.sh -s prod to start the application
  • $ docker exec -it beer_crackerz_back python manage.py createsuperuser to create the super user
  • configure your system web server (or reverse proxy) according to used parameters
  • configure the domain DNS records to point at your instance

* On next releases, BeerCrackerz will handle itself the mail server so it doesn't rely on an external service.

Local production

The local production is mostly made to test developments and how they will later behave on a production enviromnent. To properly install a local production, you must ensure that, aside from installing docker, docker-compose and npm, you also have a mail address, a MailJet API key and a MailJet API secret*. Those information will be asked when installing BeerCrackerz using managment script, run the following :

  • $ ./bc.sh -i locprod to setup the associated environment file
  • $ ./bc.sh -b locprod to build BeerCrackerz docker images
  • $ ./bc.sh -s locprod to start the application
  • $ docker exec -it beer_crackerz_back python manage.py createsuperuser to create the super user

* On next releases, BeerCrackerz will handle itself the mail server so it doesn't rely on an external service.

Instance administration

This entry is only a guide to install BeerCrackerz. To learn how to manage an instance in the long run, please read the Administration wiki entry.

Clone this wiki locally