diff --git a/silverpeas/content.md b/silverpeas/content.md index ee6558872..0c140884b 100644 --- a/silverpeas/content.md +++ b/silverpeas/content.md @@ -20,7 +20,7 @@ The Silverpeas images support actually only the two first database systems; beca For the same reasons, the Docker images of Silverpeas aren't shipped with the Oracle JVM but with the default OpenJDK. Silverpeas uses the Wildfly application server as runtime. -The Silverpeas image uses the following environment variables to set the database access parameters: +The Silverpeas images use the following environment variables to set the database access parameters: - `DB_SERVERTYPE` to specify the database system to use with Silverpeas: POSTGRESQL for PostgreSQL, MSSQL for Microsoft SQLServer, ORACLE for Oracle. By default, it is set to POSTGRESQL. - `DB_SERVER` to specify the IP address or the name of the host on which the database system is running. By default, it is set to `localhost`. @@ -49,6 +49,7 @@ Finally, a Silverpeas instance can be started by specifying the required databas $ docker run --name silverpeas -p 8080:8000 -d \ -e DB_SERVERTYPE="POSTGRESQL" \ + -e DB_SERVER="database" \ -e DB_NAME="Silverpeas" \ -e DB_USER="silverpeas" \ -e DB_PASSWORD="thesilverpeaspassword" \ @@ -57,7 +58,7 @@ Finally, a Silverpeas instance can be started by specifying the required databas --link postgresql:database \ silverpeas -The Silverpeas images expose the 8000 port and here this port is mapped to the 8080 port of the host. For a PostgreSQL database system, you can omit the `DB_SERVERTYPE` environment variable. +The Silverpeas images expose the 8000 port and here this port is mapped to the 8080 port of the host. For a PostgreSQL database system, you can omit the `DB_SERVERTYPE` environment variable. Here, as the PostgreSQL database is linked under the alias `database`, it is required to specifiy it also as the database hostname with the `DB_SERVER` environment variable. By default, some volumes are created inside the container, so that we can access them in the host.(Refers the [Docker Documentation](https://docs.docker.com/engine/tutorials/dockervolumes/#locating-a-volume) to locate them.) Among them `/opt/silverpeas/log` and `/opt/silverpeas/data`: the first volume contains the logs produced by Silverpeas whereas the second volume contains all the data that are created and managed by the users in Silverpeas. Because the latter has already a directories structure created at image creation, a host directory cannot be mounted into the container at `opt/silverpeas/data` without losing the volume's content (the mount point overlays the pre-existing content of the volume). In our example, in order to easily locate the two volumes, we label them explicitly with respectively the labels `silverpeas-log` and `silverpeas-data`. (Using a [Data Volume Container](https://docs.docker.com/engine/userguide/containers/dockervolumes/) to map `/opt/silverpeas/log` and `/opt/silverpeas/data` is a better solution.) @@ -101,20 +102,23 @@ For a PostgreSQL database system, some configurations are required in order to b # Using a Data Volume Container -To manage more effectively the data produced by an application, the Docker team recommends to use a Data Volume Container. In Silverpeas, there are three types of data produced by the application: +To manage more effectively the data produced by an application, the Docker team recommends to use a Data Volume Container. In Silverpeas, there are four types of data produced by the application: - the logging stored in `/opt/silverpeas/log`, - the user data and those produced by Silverpeas from the user data in `/opt/silverpeas/data`, -- the user domains and the domain authentication definitions in respectively `/opt/silverpeas/properties/org/silverpeas/domains` and `/opt/silverpeas/properties/org/silverpeas/authentication`. +- the user domains and the domain authentication definitions in respectively `/opt/silverpeas/properties/org/silverpeas/domains` and `/opt/silverpeas/properties/org/silverpeas/authentication`, +- the workflows created by the workflow editor in `/opt/silverpeas/xmlcomponents/workflows`. -The directories `/opt/silverpeas/log`, `/opt/silverpeas/data`, and `/opt/silverpeas/properties` are all defined as volumes in the Docker image. +Beside these directories, according to your specific needs, custom configuration scripts can be added in the directories `/opt/silverpeas/configuration/jboss` and `/opt/silverpeas/configuration/silverpeas`. -To define a Data Volume Container for Silverpeas: +The directories `/opt/silverpeas/log`, `/opt/silverpeas/data`, `/opt/silverpeas/properties`, `/opt/silverpeas/xmlcomponents/workflows`, and `/opt/silverpeas/configuration` are all defined as volumes in the Docker image. + +To define a Data Volume Container for Silverpeas, for example: $ docker create --name silverpeas-store \ - -v /opt/silverpeas/data \ - -v /opt/silverpeas/log \ - -v /opt/silverpeas/properties \ + -v silverpeas-data:/opt/silverpeas/data \ + -v silverpeas-log:/opt/silverpeas/log \ + -v silverpeas-properties:/opt/silverpeas/properties \ -v /etc/silverpeas/config.properties:/opt/silverpeas/configuration/properties \ silverpeas \ /bin/true @@ -129,15 +133,43 @@ Then to mount the volumes in the Silverpeas container: If you have to customize the settings of Silverpeas or add, for example, a new database definition, then specify these settings with the Data Volume Container: $ docker create --name silverpeas-store \ - -v /opt/silverpeas/data \ - -v /opt/silverpeas/log \ - -v /opt/silverpeas/properties \ + -v silverpeas-data:/opt/silverpeas/data \ + -v silverpeas-log:/opt/silverpeas/log \ + -v silverpeas-properties:/opt/silverpeas/properties \ -v /etc/silverpeas/config.properties:/opt/silverpeas/configuration/properties \ -v /etc/silverpeas/CustomerSettings.xml:/opt/silverpeas/configuration/silverpeas/CustomerSettings.xml \ -v /etc/silverpeas/my-datasource.cli:/opt/silverpeas/configuration/jboss/my-datasource.cli \ silverpeas \ /bin/true +# Document conversion + +Some features in Silverpeas (export, preview, content visualization, ...) requires a document converter. The document conversion is performed in Silverpeas by the program LibreOffice running as a daemon. So, in order to enable and to use these features, you have first to use a Data Volume Container to store all the Silverpeas data and second to run a container embbeding a LibreOffice program running as a daemon. There is no official Docker images of LibreOffice but DockerHub hosts some of unofficial images of it ([xcgd/libreoffice](https://hub.docker.com/r/xcgd/libreoffice/) for example). + +Once a Data Volume Container created for Silverpeas as explained in the section above, you have to link it with the Docker image running LibreOffice as a daemon in order the program have access the documents to convert: + + $ docker run --name libreoffice -d \ + --volumes-from silverpeas-store \ + xcgd/libreoffice + +Check the port at which the LibreOffice image is listening and then defines it in the Silverpeas configuration. In our example, `xcgd/libreoffice` listens by default the port 8997. The configuration parameters to communicate with LibreOffice are defined by the two following properties: + +- `CONVERTER_HOST` is either the IP address or the name of the host in which runs LibreOffice, +- `CONVERTER_PORT` is the port number at which the LibreOffice daemon listens. + +These properties have to be defined in the Silverpeas global configuration file `config.properties` that is mounted in the Data Volume Container: + + CONVERTER_HOST=libreoffice + CONVERTER_PORT=8997 + +Then the Docker image of Silverpeas can be ran: + + $ docker run --name silverpeas -p 8080:8000 -d \ + --link postgresql:database \ + --link libreoffice:libreoffice \ + --volumes-from silverpeas-store \ + silverpeas + # Logs You can follow the activity of Silverpeas by watching the logs generated in the mounted `/opt/silverpeas/log` directory.