-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
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/BeerCrackerzto clone the source code on your system -
# chmod +x ./bc.shto give the managment script execution permission :
Aside from installing docker, docker-compose and npm, the development environment is pretty straightforward to build, run the following :
-
$ ./bc.sh -i devto setup the associated environment file -
$ ./bc.sh -b devto build BeerCrackerz docker images -
$ ./bc.sh -s devto start the application -
$ docker exec -it beer_crackerz_back python manage.py createsuperuserto create the super user -
$ npm run watchto look for changes in .js and .scss files
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.
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 prodto setup the associated environment file -
$ ./bc.sh -b prodto build BeerCrackerz docker images -
$ ./bc.sh -s prodto start the application -
$ docker exec -it beer_crackerz_back python manage.py createsuperuserto 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.
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 locprodto setup the associated environment file -
$ ./bc.sh -b locprodto build BeerCrackerz docker images -
$ ./bc.sh -s locprodto start the application -
$ docker exec -it beer_crackerz_back python manage.py createsuperuserto create the super user
* On next releases, BeerCrackerz will handle itself the mail server so it doesn't rely on an external service.
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.