Running locally via Docker Pub

Running via docker is easy - after installing Docker (on Mac) and starting it, follow these steps.

Note that /Users/raz is an example - use your own home or any other folder...

# first time, create a local db folder somewhere in your home. (if you are reinstalling it, just remove all its contents)
#
# cd /Users/raz
# mkdir -p diesel/docker/db
#
# first time - pull the image locally (image name is raz-diesel):
# docker pull razie/raz-diesel
#
# then just run the container:
# docker run -p 127.0.0.1:9000:9000 -v/Users/raz/diesel/docker/db:/data/db -it razie/raz-diesel
#
# and point the browser to localhost:9000
#

If you need to see the logs / debug custom plugins, then you can run it with a console:

# to run just the container and debug it:
#
# docker run -p 127.0.0.1:9000:9000 -v/Users/raz/diesel/docker/db:/data/db -it --entrypoint=/bin/bash razie/raz-diesel
#

The database docker/db will contain all the data of your local instance. You can delete the contents of this folder if you need to reinstall everything.

When you start it the first time, it will ask you to login to the central server and clone a reactor - use one of your reactors or a default one like "specs".

updating

To update to a new version, just pull and run the new version. Before reinstalling from scratch, make sure to sync your changes.

Notes

Notes:

  • port mapping: we're assuming you have no conflicts on port 9000. If you do have conflicts, you can map any other local port, like 9003
    • if you change the default port mapping, it's easier if you also change the one inside the docker container.

Local configuration

You can access the local configuration by starting the docker server in console mode and changing the configuration file: rk/dist/conf/application.conf.

Using docker-compose

You can run this even easier via docker-compose quite nicely.

  1. Setup the docker-compose file, like this:
version: "2.1"
services:
  diesel:
    image: razie/raz-diesel:latest
    ports:
      - 9003:9000
    restart: unless-stopped
    volumes:
      - dieseldb:/data/db
    environment:
        THREADS: 2

  diesel-config:
    build:
      context: ./dieseldocker/config
      dockerfile: ./Dockerfile
    command: ./bootstrap.sh
    working_dir: /dieseldocker
    volumes:
      - ./dieseldocker:/dieseldocker
    links:
      - diesel
    depends_on:
      - diesel

volumes:
  dieseldb:

The first container is a diesel container, the second one is an optional bootstrap container, which will download the remote cloud configuration on the first startup. This is very useful when embedding diesel into another product.

  1. setup an automated user and password on myproject.dieselapps.com
  2. update the bootstrap.sh file with your MYPROJECT, MYEMAIL and MYPASSWORD
  3. bring it up with docker-compose -f diesel-compose.yml up


Was this useful?    

By: Razie | 2018-06-28 .. 2019-10-27 | Tags: academy , reference


Viewed 174 times ( | Print ) this page.

You need to log in to post a comment!

© Copyright DieselApps, 2012-2021, all rights reserved.