From 6d9577aee40927f1949724d2521abf7214e690b1 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Fri, 4 Dec 2015 20:26:58 +0100 Subject: [PATCH] Update Docker documentation to mention /var/lib/spectrum2 volume --- documentation/installation/docker.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/documentation/installation/docker.md b/documentation/installation/docker.md index a95b3722..adc8c34b 100644 --- a/documentation/installation/docker.md +++ b/documentation/installation/docker.md @@ -17,9 +17,9 @@ You can also update Spectrum 2 using this command later. ## Create directory for Spectrum 2 configuration files -Now you have to decide where to store the configuration files for Spectrum 2. We will use `/opt/spectrum2/` in our example: +Now you have to decide where to store the configuration files for Spectrum 2. We will use `/opt/spectrum2/configuration` in our example: - $ mkdir /opt/spectrum2 + $ mkdir -p /opt/spectrum2/configuration ## Create configuration file @@ -28,15 +28,21 @@ You can use following default configuration files as a starting place: * [XMPP Frontend - gateway mode](https://github.com/hanzz/spectrum2/blob/spectrum/src/sample2_gateway.cfg) * [XMPP Frontend - server mode](https://github.com/hanzz/spectrum2/blob/spectrum/src/sample.cfg) -Download the configuration file you chose into `/opt/spectrum` directory you have created earlier and edit it as you want. Check the documentation and tutorials for configuration examples. +Download the configuration file you chose into `/opt/spectrum2/configuration` directory you have created earlier and edit it as you want. Check the documentation and tutorials for configuration examples. Note that the configuration files must have `.cfg` file extension. +## Create directory for Spectrum 2 data + +You also have to create persistent directory to store various Spectrum 2 data like SQLite3 database and so on: + + $ mkdir -p /opt/spectrum2/data + ## Start Spectrum 2 To start Spectrum 2 on background using Docker, all you have to do is running following Docker command: - $ docker run --name="spectrum2" -d -v /opt/spectrum2:/etc/spectrum2/transport spectrum2/spectrum2 + $ docker run --name="spectrum2" -d -v /opt/spectrum2/configuration:/etc/spectrum2/transport -v /opt/spectrum2/data:/var/lib/spectrum2 spectrum2/spectrum2 It will start Spectrum 2 and load the configuration files from `/opt/spectrum`. It also gives the spawned container name `spectrum2`.