openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit afa5f76f757c15ba747d46c34aaddefa59e2786a
parent c126ab0445577632476bb76bd7376e0d2f209212
Author: Jan Dankert <develop@jandankert.de>
Date:   Tue,  1 Oct 2019 01:14:05 +0200

Fix: Example configuration for Docker.

Diffstat:
Dockerfile | 8++++++--
config/config.yml | 25++++++++++++++++++++-----
doc/examples/config/docker.yml | 36++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 7 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -18,9 +18,13 @@ RUN apk --update --no-cache add \ echo "Protocols h2 h2c http/1.1" >> /etc/apache2/httpd.conf + +# Copy the application to document root COPY . $DOCROOT -COPY ./config/config-docker.yml /etc/openrat/config.yml -COPY ./config/config-etc.yml $DOCROOT/config/config.yml + +# Place configuration in /etc, outside the docroot. +RUN echo "include: /etc/openrat.yml" > $DOCROOT/config/config.yml +COPY doc/examples/config/docker.yml /etc/openrat.yml # Cleanup RUN rm -r $DOCROOT/doc/* && \ diff --git a/config/config.yml b/config/config.yml @@ -1,15 +1,30 @@ -# OpenRat CMS configuration - Minimal settings -# Change this file or create 'config-<hostname>.yml' for a per-host-configuration +# OpenRat CMS configuration +# ------------------------- + +# This file is YAML formatted. + +# Security attention: +# Place your sensitive configuration outside of your document root! + database: db: enabled : false # remove this line or set the value to 'true' to enable this database dsn : "mysql:host=localhost; dbname=name_of_db; charset=utf8" user : "dbuser" # user - password: "dbpass" # password + password: "dbpass" # password (attention: please to NOT place any passwords in the document root) +# It is recommended to place a configation outside the document root +# +# Simple example: +# include: /etc/openrat/config.yml +# +# You may use environment variables like +# include: ${env:YOUR_ENV_VAR}.yml +# +# or http header like +# include: /etc/openrat/config-${http:host}.yml +# include: - ./config-${http:host}.yml - -# There are a lot of more configuration settings available, see file 'config-all-example.yml' ... diff --git a/doc/examples/config/docker.yml b/doc/examples/config/docker.yml @@ -0,0 +1,35 @@ + +# OpenRat CMS Configuration +# + +login: + motd: "${env:CMS_MOTD}" + +database-default: + default-id: db + + +database: + db: + enabled : true # set this to 'true' for using this connection + dsn : "${env:DB_TYPE}:host=${env:DB_HOST}; dbname=${env:DB_NAME}" + description: "PDO" + name : "PRO" + type : pdo + user : ${env:DB_USER} + password : ${env:DB_PASS} + base64 : true # store binary as BASE64 (in postgresql 7.x set this to 'true') + prefix : cms_ + suffix : _or + persistent : yes # use persistent connections (try this, it's faster) + charset : UTF-8 + cmd : "" + prepare : true + transaction: true + + +production: true + +application: + name: "${env:CMS_NAME}" + operator: "${env:CMS_OPERATOR}"+ \ No newline at end of file