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 embedded MongoDB uses /data/db
for storage. In a normal deployment, you will likely want to mount this to a persistent and backed up volume, so see above the mounting to the local docker/db
. This ensures that when upgrading the container image, the database will not be wiped out as well. You can also back it up and recover it separate from the docker container.
This database contains all the data of your local instance, including topics, specs, stories, wikis, runtime data, cron jobs, user accounts etc.
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". So whenever you see this screen, it means the /data/db folder was empty. Sometimes this indicates a failure to mount it to a volume.
To update to a new version, just pull and run the new version. Before reinstalling from scratch, make sure to sync your changes.
Notes:
You can access the local configuration by starting the docker server in console mode and changing the configuration file: rk/dist/conf/application.conf
.
You can run this even easier via docker-compose quite nicely.
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.
docker-compose -f diesel-compose.yml up
There are several configuration options when you run diesel locally.
Ability to exclude certain specifications at the deployment level, i.e. “-deprecated” etc.
export DIESEL_DIESEL_GLOBAL_TQSPEC=-deprecated
Allow specific diesel installations to configure additional custom headers.
Via ENV variables, for instance:
DIESEL_WIKI_HEADERS=X-Frame-Options,X2
DIESEL_WIKI_HEADER_X_FRAME_OPTIONS_VALUE=value1
these would apply to all requests
You can also build your own version of the configuration into the docker image, by doing the import above as part of the build and then freezing the container with the database containing the configuration. An issue with that is that this will also overwrite users and running crons etc, so ask support for ideas, if that's a problem.
You need to log in to post a comment!