openrat-cms

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

commit a4476d3a46e2b865b0372f752a65ca212fce5b67
parent 53ce22cfddaf4323f969a399f543e2c488281ae8
Author: Jan Dankert <jan.2019@jandankert.de>
Date:   Tue, 19 Nov 2019 20:39:45 +0100

Fix permissions for preview folder; Added docker documentation.

Diffstat:
Dockerfile | 16++++++++++++----
README.md | 41++++++++++++++++++++++++++++++++---------
2 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -3,10 +3,9 @@ FROM alpine:3.10 LABEL maintainer="Jan Dankert" ENV DB_TYPE="mysql" -ENV DB_TYPE="mysql" ENV DB_HOST="localhost" ENV DB_NAME="cms" -ENV DB_USER="" +ENV DB_USER="cms" ENV DB_PASS="" ENV CMS_MOTD="Welcome to dockerized CMS" @@ -26,8 +25,13 @@ RUN apk --update --no-cache add \ chown apache /var/log/apache2 && \ chown apache /run/apache2 && \ rm -r $DOCROOT/* && \ - mkdir -p /var/www/preview && chown apache /var/www/preview && \ - echo "Alias /preview /var/www/preview" >> /etc/apache2/httpd.conf && \ + mkdir -p /var/www/localhost/preview && chown apache /var/www/localhost/preview && \ + echo "Alias /preview /var/www/localhost/preview" >> /etc/apache2/httpd.conf && \ + echo "<Directory \"/var/www/localhost/preview\"> " >> /etc/apache2/httpd.conf && \ + echo " AllowOverride None" >> /etc/apache2/httpd.conf && \ + echo " Options None" >> /etc/apache2/httpd.conf && \ + echo " Require all granted" >> /etc/apache2/httpd.conf && \ + echo "</Directory>" >> /etc/apache2/httpd.conf && \ echo "Protocols h2 h2c http/1.1" >> /etc/apache2/httpd.conf && \ echo "H2ModernTLSOnly off" >> /etc/apache2/httpd.conf @@ -71,6 +75,10 @@ log:\n\ \n\ production: true\n\ \n\ +publish:\n\ + filesystem:\n\ + directory: /var/www/localhost/preview\n\ +\n\ application:\n\ name: "${env:CMS_NAME}"\n\ operator: "${env:CMS_OPERATOR}"\n\ diff --git a/README.md b/README.md @@ -20,28 +20,32 @@ Yes, there are a lot of good CMS in the world, and a lot of them are available f ## Install -### What do I need? +### Requirements You need a server with PHP >= 5.5 and a relational database. MariaDB and MySQL are recommended, while PostgresQL and SQLite are supported too. +### Local installation + #### Download and untar it Download the complete archive and install it on your server -#### The GIT way +#### Clone GIT repository -`git pull` +Or clone the repository with the command -#### Docker +`git clone http://git.code.weiherhei.de/openrat-cms.git` -OpenRat-CMS is available [at Dockerhub](https://hub.docker.com/r/openrat/openrat-cms). +or clone from Github + +`git clone https://github.com/dankert/openrat-cms.git` -## Configuration +### Add database configuration -Edit the file config/config.yml and enter your database access data, like: +Edit the file `config/config.yml` and enter your database access data, like: database: db: @@ -50,4 +54,24 @@ Edit the file config/config.yml and enter your database access data, like: user : "user" password: "password" -That's it.- \ No newline at end of file +### Docker + +OpenRat-CMS is available [at Dockerhub](https://hub.docker.com/r/openrat/openrat-cms). + +#### run docker container + +`docker run -d -p 8080:8080 dankert/openrat-cms` + +#### Environment variables + +| Name | Description | Default | +| ----------- | ----------- | ------- | +|DB_TYPE|database type|mysql +|DB_HOST|database hostname|localhost +|DB_NAME|database schema|cms +|DB_USER|database user| +|DB_PASS|database password| +|CMS_MOTD|Message of the day|Welcome to dockerized CMS +|CMS_NAME|Software name|OpenRat CMS (Docker) +|CMS_OPERATOR|Name of your company|Docker-Host +