Skip to main content

Docker Installation

Leemons can be installed as a containerized app. This is useful for automatizing processes and avoiding the need of installing all the required dependencies on your system.

1. Requirements

Docker and Docker Compose

Docker makes it possible to deploy all the necessary parts for leemons to work, making it fast, easy, and predictable. We use the docker-compose tool for managing the multi-container deployment, so there is less work to do and Leemons can be enjoyed even quicker!

You can install Docker and Docker Compose through the docker website.

2. Download

First of all you need to download leemons on your computer or sever, don't worry, this one is the easier step :D.

Using leemons-docker in windows is as easy as run a PowerShell script, this script will generate all the needed files.

Download the file ahead to your desired directory (keep in mind it will generate files).

Download name and directory

We recommend downloading in: /my-docker-leemons/leemons.ps1

Download leemons.ps1

Or see the code
leemons.ps1
$FILE="./docker-compose.yaml"try {  $OUTPUT=docker --version  echo "Docker is installed"}catch {  echo "Please install Docker before continue!"  Pause  exit 0}try {  $OUTPUT=docker-compose --version  echo "docker-compose is installed"} catch {  echo "Please install docker-compose before continue!"  Pause  exit 0}if ( Test-Path -Path $FILE -PathType Leaf ) {  echo "Config files already created."} else {@"MYSQLDB_USER=rootMYSQLDB_ROOT_PASSWORD=leemonsMYSQLDB_DATABASE=leemonsMYSQLDB_LOCAL_PORT=3307NODE_LOCAL_PORT=8080"@ |  Out-File -FilePath ".env" -Encoding ASCII@"version: "3.8"services:  mysqldb:    image: mysql:5.7    command: --default-authentication-plugin=mysql_native_password    restart: always    environment:      MYSQL_ROOT_PASSWORD: `$MYSQLDB_ROOT_PASSWORD      MYSQL_DATABASE: `$MYSQLDB_DATABASE    ports:      - `$MYSQLDB_LOCAL_PORT:3306    expose:      - 3306    volumes:      - db:/var/lib/mysql    healthcheck:      test: mysqladmin ping -h 127.0.0.1 -uroot --password=$`$MYSQL_ROOT_PASSWORD      timeout: 10s      retries: 10  leemons:    image: leemonade/leemons:dev    restart: always    stdin_open: true    tty: true    ports:      - `$NODE_LOCAL_PORT:8080    environment:      DATABASE_HOST: mysqldb      DATABASE_PORT: 3306      DATABASE_USERNAME: root      DATABASE_DATABASE: `$MYSQLDB_DATABASE      DATABASE_PASSWORD: `$MYSQLDB_ROOT_PASSWORD    depends_on:      mysqldb:        condition: service_healthyvolumes:  db:"@ | Out-File -FilePath $FILE -Encoding ASCII  "docker-compose up" | Out-File -FilePath launch-leemons.ps1 -Encoding ASCII}.("./launch-leemons.ps1")Pause

Now you only need to run the file, this can differ based on your windows version:

  • Windows10: Right click the file and select open with powershell
  • Windows11: Right click the file and select run with powershell

Once running, it will start downloading some files and docker stuff (it may take a few minutes), once ready, you should see something like this:

Leemons backend server being initialized when printing 'Listening on http://localhost:8080'

When the server is ready, open a new tab in your browser, and navigate to http://localhost:8080

3. Bulk data creation template configuration

NOT SUPPORTED YET

Currently the bulk templates are not yet supported for docker

4. Initial configuration

The first run you will need to set up some things, follow the steps and enter your information.

Once you get to the email provider, we recommend using a free smtp server, or if you have one, go and try it.

tip

We recommend using this free smtp server, we have tried it and works like a charm.

5. Database

Leemons docker uses a MySQL server internally, which is configured through the .env file in your directory

6. Reset the installation

In order to reset your Leemons installation, you need to clean your docker images, this can be done with the following command inside your my-docker-leemons directory:

docker-compose down;
docker rmi --force $(docker images leemonade/leemons -q);