168 lines
6 KiB
Markdown
168 lines
6 KiB
Markdown
# README
|
|
|
|
## WHAT IS DOTCLEAR
|
|
|
|
Dotclear is an open-source web publishing software.
|
|
Take control over your blog!
|
|
|
|
Dotclear project's purpose is to provide a user-friendly
|
|
tool allowing anyone to publish on the web, regardless of their technical skills.
|
|
|
|
=> https://dotclear.org/
|
|
|
|
## WHAT IS DOCKER-DOTCLEAR
|
|
|
|
This repository contains all features to build or run Dotclear on a Docker environment.
|
|
It is hightly based on work from [darknao](https://github.com/darknao/docker-dotclear).
|
|
|
|
* Dotclear docker images are avaialable at [Docker hub](https://hub.docker.com/r/jcpd/docker-dotclear)
|
|
* Dotclear docker sources are avaialable at [Github repository](https://github.com/JcDenis/docker-dotclear)
|
|
|
|
### TAGS
|
|
|
|
Docker image tag is based on __Alpine Linux OS, Nginx server and PHP-FPM language__
|
|
It is composed of Dotclear version or release type.
|
|
|
|
* x.x : A given Dotclear version (ex: 2.31.1)
|
|
* latest : The latest stable Dotclear release
|
|
* dev : A Dotclear unstable (nightly) release
|
|
|
|
To build image from stable canal, from the Dokerfile path, execute :
|
|
|
|
docker build -t dotclear:latest --build-arg CANAL=stable .
|
|
|
|
Or to build image from unstable canal, from the Dokerfile path, execute :
|
|
|
|
docker build -t dotclear:dev --build-arg CANAL=unstable .
|
|
|
|
Builds should support postgresql and mysql database.
|
|
|
|
### DOCKER
|
|
|
|
Exemple of a docker compose file with a mariadb database.
|
|
|
|
services:
|
|
# MYSQL database service
|
|
dc_db:
|
|
image: mariadb:latest
|
|
container_name: dotcleardb
|
|
restart: unless-stopped
|
|
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
|
volumes:
|
|
- dc_db:/var/lib/mysql
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: dotclear_root
|
|
MYSQL_DATABASE: dotclear_db
|
|
MYSQL_USER: dotclear_user
|
|
MYSQL_PASSWORD: dotclear_pwd
|
|
|
|
# PHP-FPM Service
|
|
dc_app:
|
|
image: jcpd/docker-dotclear:latest
|
|
container_name: dotclearphp
|
|
restart: unless-stopped
|
|
volumes:
|
|
- dc_app:/var/www/dotclear
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- dc_db # MYSQL database service
|
|
environment:
|
|
# These variables are only used for first install, see inc/config.php
|
|
DC_DBDRIVER: mysqlimb4 # MYSQL full UTF-8
|
|
DC_DBHOST: dc_db # MYSQL database service
|
|
DC_DBNAME: dotclear_db # MYSQL_DATABASE
|
|
DC_DBUSER: dotclear_user # MYSQL_USER
|
|
DC_DBPASSWORD: dotclear_pwd # MYSQL_PASSWORD
|
|
DC_DBPREFIX: dc_ # Database tables prefix
|
|
DC_ADMINMAILFROM: contact@exemple.com # Dotclear mail from
|
|
|
|
volumes:
|
|
dc_app: # NGINX (dotclear) volume
|
|
dc_db: # MYSQL (database) volume
|
|
|
|
* You __MUST__ replace database USER and PASSWORD by something else.
|
|
|
|
Then execute
|
|
|
|
docker-compose up -d
|
|
|
|
Dotclear is now available on your server host at http://locahost/
|
|
On first run Dotclear does its installation process and ask you to create a first user.
|
|
On first run you should wait that container download and install required version of Dotclear,
|
|
this may takes a while...
|
|
|
|
### BLOG
|
|
|
|
__Standard configuration__
|
|
|
|
These images use Dotclear URL rewriting in PATH INFO mode.
|
|
By default URL and path should be corrected by a custom plugin automatically.
|
|
Blogs URLs looks like:
|
|
* http://localhost/default/
|
|
* http://localhost/blog2/
|
|
* ...
|
|
|
|
Blogs administration is available at http://localhost/admin
|
|
|
|
When you create a new blog in standard configuration,
|
|
you must use the _blog_id_ with the trailing slash in blog URL setting like http://localhost/blog_id/
|
|
|
|
__Non standard configuration__
|
|
|
|
Setup nginx server configuration (see bellow):
|
|
* adapt _/var/www/dotclear/servers/*.conf_ to your needs
|
|
|
|
Then to configure blog:
|
|
* go to the administration interface at http://my_custom_domain/admin,
|
|
* left side menu _Blog settings_
|
|
* panel _Advanced parameters_
|
|
* set _Blog URL_ to http://my_custom_domain/ (with trailing slash)
|
|
* set _URL scan method_ to 'PATH_INFO'
|
|
|
|
Then fix public_path and public_url for the blog:
|
|
* go to the administration interface at http://my_custom_domain/admin,
|
|
* left side menu _about:config_
|
|
* panel _system_
|
|
* set _public_path_ to the real path on system to public directory of the blog
|
|
* set _public_url_ to the URL of the public directory of the blog
|
|
|
|
### STRUCTURE
|
|
|
|
Default root path of this image structure is in __/var/www/dotclear__
|
|
* _app_ : Dotclear software files
|
|
* _blogs_ : Blogs public directories
|
|
* _cache_ : Dotclear template cache
|
|
* _plugins_ : Third party plugins directory
|
|
* _servers_ : Nginx servers configurations
|
|
* _var_ : Dotclear var directory
|
|
|
|
### UPGRADE
|
|
|
|
To upgrade Dotclear to next version, just pull latest image and restart the docker container (recommanded)
|
|
or use Dotclear buitin update system.
|
|
|
|
Reminder: a dedicated dashboard is available at http://localhost/admin/upgrade.php
|
|
|
|
### TODO
|
|
|
|
* Add support of Dotclear's DEBUG mode for Dotclear and logs.
|
|
* Add better cache management. From another container or from Dotclear container.
|
|
* Add mail support.
|
|
* Enhance server and php configuration. From x.conf files.
|
|
|
|
### CONTRIBUTING
|
|
|
|
This image is an open source project. If you'd like to contribute, please read the [CONTRIBUTING file](/CONTRIBUTING.md).
|
|
You can submit a pull request, or feel free to use any other way you'd prefer.
|
|
|
|
### LICENSE
|
|
|
|
Copyright Jean-Christian Paul Denis
|
|
AGPL-v3 <https://www.gnu.org/licenses/agpl-3.0.html>
|
|
|
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
Dotclear software is licensed under AGPL-3, Copyright Olivier Meunier & Association Dotclear
|