Compare commits
No commits in common. "ef972f891a79964c20f58d883dd769baa1501dbf" and "3dc108f65b5779187e7ca1c02b35954649f7285e" have entirely different histories.
ef972f891a
...
3dc108f65b
5 changed files with 35 additions and 134 deletions
12
.github/workflows/release_stable.yml
vendored
12
.github/workflows/release_stable.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
contents: read
|
contents: read
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.dotclear.outputs.version }}
|
version: ${{ steps.dotclear.outputs.version }}
|
||||||
exists: ${{ steps.repository.outputs.exists }}
|
exists: ${{ steps.repository.outputs.release-exists }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
run: curl -sSL https://bit.ly/install-xq | sudo bash
|
run: curl -sSL https://bit.ly/install-xq | sudo bash
|
||||||
|
@ -42,9 +42,9 @@ jobs:
|
||||||
|
|
||||||
- name: Check repository releases
|
- name: Check repository releases
|
||||||
id: repository
|
id: repository
|
||||||
uses: mukunku/tag-exists-action@v1.6.0
|
uses: insightsengineering/release-existence-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.dotclear.outputs.version }}
|
release-tag: ${{ steps.dotclear.outputs.version }}
|
||||||
|
|
||||||
do_release:
|
do_release:
|
||||||
name: Create repository release according to Dotclear version
|
name: Create repository release according to Dotclear version
|
||||||
|
@ -54,16 +54,12 @@ jobs:
|
||||||
needs: check_release
|
needs: check_release
|
||||||
if: needs.check_release.outputs.exists == 'false'
|
if: needs.check_release.outputs.exists == 'false'
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Create repository release
|
- name: Create repository release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.check_release.outputs.version }}
|
|
||||||
tag_name: ${{ needs.check_release.outputs.version }}
|
tag_name: ${{ needs.check_release.outputs.version }}
|
||||||
|
name: ${{ needs.check_release.outputs.version }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
|
23
Dockerfile
23
Dockerfile
|
@ -52,7 +52,7 @@ COPY etc/snippets_common.conf /etc/nginx/snippets/snippets_common.conf
|
||||||
# Try to bypass Alpine Linux iconv bug
|
# Try to bypass Alpine Linux iconv bug
|
||||||
#RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv
|
#RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv
|
||||||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.12/community/ gnu-libiconv=1.15-r2
|
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.12/community/ gnu-libiconv=1.15-r2
|
||||||
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
|
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so
|
||||||
|
|
||||||
# Use PHP 8.3 release
|
# Use PHP 8.3 release
|
||||||
ENV VER_PHP=php83
|
ENV VER_PHP=php83
|
||||||
|
@ -115,27 +115,6 @@ ENV DC_TPL_CACHE=/var/www/dotclear/cache
|
||||||
# Directory for dotclear var
|
# Directory for dotclear var
|
||||||
ENV DC_VAR=/var/www/dotclear/var
|
ENV DC_VAR=/var/www/dotclear/var
|
||||||
|
|
||||||
##
|
|
||||||
# Plugins
|
|
||||||
##
|
|
||||||
|
|
||||||
# DotclearWatch
|
|
||||||
ENV VER_DW=0.9.3
|
|
||||||
RUN curl -fsSL -o plugin.zip "https://github.com/JcDenis/DotclearWatch/releases/download/v$VER_DW/plugin-DotclearWatch.zip" \
|
|
||||||
&& mkdir -p /var/lib/dotclear/plugins/DotclearWatch \
|
|
||||||
&& unzip -d /var/lib/dotclear/plugins plugin.zip \
|
|
||||||
&& chown -R www:www /var/lib/dotclear/plugins \
|
|
||||||
&& rm plugin.zip
|
|
||||||
|
|
||||||
# sysInfo
|
|
||||||
ENV VER_SI=9.6
|
|
||||||
RUN curl -fsSL -o plugin.zip "https://github.com/franck-paul/sysInfo/releases/download/$VER_SI/plugin-sysInfo-$VER_SI.zip" \
|
|
||||||
&& mkdir -p /var/lib/dotclear/plugins/sysInfo \
|
|
||||||
&& unzip -d /var/lib/dotclear/plugins plugin.zip \
|
|
||||||
&& chown -R www:www /var/lib/dotclear/plugins \
|
|
||||||
&& rm plugin.zip
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# END
|
# END
|
||||||
##
|
##
|
||||||
|
|
110
README.md
110
README.md
|
@ -8,15 +8,13 @@
|
||||||
![Testing image build](https://github.com/JcDenis/docker-dotclear/actions/workflows/release_testing.yml/badge.svg)
|
![Testing image build](https://github.com/JcDenis/docker-dotclear/actions/workflows/release_testing.yml/badge.svg)
|
||||||
![Unstable image build](https://github.com/JcDenis/docker-dotclear/actions/workflows/release_unstable.yml/badge.svg)
|
![Unstable image build](https://github.com/JcDenis/docker-dotclear/actions/workflows/release_unstable.yml/badge.svg)
|
||||||
|
|
||||||
|
## THE SHORT WAY
|
||||||
## 1. THE SHORT WAY
|
|
||||||
|
|
||||||
In your futur server, with Docker compose installed, execute:
|
In your futur server, with Docker compose installed, execute:
|
||||||
|
|
||||||
curl -fsSL -o docker-compose.yaml https://raw.githubusercontent.com/JcDenis/docker-dotclear/refs/heads/master/docker-compose.yaml && docker-compose up -d
|
curl -fsSL -o docker-compose.yaml https://raw.githubusercontent.com/JcDenis/docker-dotclear/refs/heads/master/docker-compose.yaml && docker-compose up -d
|
||||||
|
|
||||||
|
## WHAT IS DOTCLEAR
|
||||||
## 2. WHAT IS DOTCLEAR
|
|
||||||
|
|
||||||
Dotclear is an open-source web publishing software.
|
Dotclear is an open-source web publishing software.
|
||||||
Take control over your blog!
|
Take control over your blog!
|
||||||
|
@ -26,28 +24,25 @@ tool allowing anyone to publish on the web, regardless of their technical skills
|
||||||
|
|
||||||
=> https://dotclear.org/
|
=> https://dotclear.org/
|
||||||
|
|
||||||
|
## WHAT IS DOCKER-DOTCLEAR
|
||||||
## 3. WHAT IS DOCKER-DOTCLEAR
|
|
||||||
|
|
||||||
This repository contains all features to build or run Dotclear on a Docker environment.
|
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).
|
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) or [Github registry](https://github.com/JcDenis/docker-dotclear/pkgs/container/docker-dotclear)
|
* Dotclear docker images are avaialable at [Docker hub](https://hub.docker.com/r/jcpd/docker-dotclear) or [Github registry](https://github.com/JcDenis?tab=packages&repo_name=docker-dotclear)
|
||||||
* Dotclear docker sources are avaialable at [Github repository](https://github.com/JcDenis/docker-dotclear)
|
* Dotclear docker sources are avaialable at [Github repository](https://github.com/JcDenis/docker-dotclear)
|
||||||
|
|
||||||
|
### TAGS
|
||||||
|
|
||||||
### 3.1 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:
|
||||||
Docker images are based on __Alpine Linux OS, Nginx server and PHP-FPM language__.
|
|
||||||
Image tags are composed of Dotclear version or release type:
|
|
||||||
|
|
||||||
* x.x : A given Dotclear version (ex: 2.31.1)
|
* x.x : A given Dotclear version (ex: 2.31.1)
|
||||||
* latest : The latest stable Dotclear release
|
* latest : The latest stable Dotclear release
|
||||||
* testing: The latest dev of Dotclear stable branch
|
* testing: The latest dev of Dotclear stable branch
|
||||||
* dev : A Dotclear unstable (nightly) release
|
* dev : A Dotclear unstable (nightly) release
|
||||||
|
|
||||||
|
### BUILDS
|
||||||
### 3.2 BUILDS
|
|
||||||
|
|
||||||
Clone this repository:
|
Clone this repository:
|
||||||
|
|
||||||
|
@ -71,13 +66,9 @@ Builds should support:
|
||||||
* linux/386,linux/amd64,linux/arm64,linux/arm/V7 plateforms
|
* linux/386,linux/amd64,linux/arm64,linux/arm/V7 plateforms
|
||||||
* docker container healthcheck
|
* docker container healthcheck
|
||||||
|
|
||||||
|
### DOCKER
|
||||||
|
|
||||||
### 3.3 DOCKER
|
**Exemple of a docker compose file with a mariadb database:**
|
||||||
|
|
||||||
|
|
||||||
#### 3.3.1 Exemple of a docker compose file with a mariadb database
|
|
||||||
|
|
||||||
Create and edit a **docker-compose.yaml** file and put into it this contents :
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# MYSQL database service
|
# MYSQL database service
|
||||||
|
@ -137,10 +128,7 @@ On first run Dotclear does its installation process and ask you to create a firs
|
||||||
On first run you should wait that container download and install required version of Dotclear,
|
On first run you should wait that container download and install required version of Dotclear,
|
||||||
this may takes a while...
|
this may takes a while...
|
||||||
|
|
||||||
|
**Another exemple with an SQLite database and a single container:**
|
||||||
#### 3.3.2 Exemple of a docker compose file with an SQLite database and a single container
|
|
||||||
|
|
||||||
Create and edit a **docker-compose.yaml** file and put into it this contents :
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
dotclear:
|
dotclear:
|
||||||
|
@ -156,24 +144,15 @@ Create and edit a **docker-compose.yaml** file and put into it this contents :
|
||||||
DC_DBNAME: \var\www\dotclear\sqlite.db
|
DC_DBNAME: \var\www\dotclear\sqlite.db
|
||||||
DC_ADMINMAILFROM: contact@exemple.com
|
DC_ADMINMAILFROM: contact@exemple.com
|
||||||
|
|
||||||
Then execute:
|
or with a simple docker command:
|
||||||
|
|
||||||
docker-compose up -d
|
|
||||||
|
|
||||||
|
|
||||||
#### 3.3.3 Direct docker run without docker compose
|
|
||||||
|
|
||||||
Exemple with a simple docker command :
|
|
||||||
|
|
||||||
docker run -d --name dotclear -p 80:80 -v dotclear:/var/www/dotclear -e DC_DBDRIVER=sqlite -e DC_DBNAME=/var/www/dotclear/sqlite.db -e DC_ADMINMAILFROM=contact@exemple.com jcpd/docker-dotclear:latest
|
docker run -d --name dotclear -p 80:80 -v dotclear:/var/www/dotclear -e DC_DBDRIVER=sqlite -e DC_DBNAME=/var/www/dotclear/sqlite.db -e DC_ADMINMAILFROM=contact@exemple.com jcpd/docker-dotclear:latest
|
||||||
|
|
||||||
SQLite database will be stored in folder \var\www\dotclear
|
SQLite database will be stored in folder \var\www\dotclear
|
||||||
|
|
||||||
|
### BLOG
|
||||||
|
|
||||||
### 3.4 BLOG
|
__Standard configuration by subfolders__
|
||||||
|
|
||||||
|
|
||||||
#### 3.4.1 Standard configuration by subfolders
|
|
||||||
|
|
||||||
These images use Dotclear URL rewriting in PATH INFO mode.
|
These images use Dotclear URL rewriting in PATH INFO mode.
|
||||||
By default URL and path should be corrected by a custom plugin automatically.
|
By default URL and path should be corrected by a custom plugin automatically.
|
||||||
|
@ -188,22 +167,7 @@ Blogs administration is available at http://localhost/admin
|
||||||
When you create a new blog in this configuration,
|
When you create a new blog in this configuration,
|
||||||
you must use the _blog_id_ with the trailing slash in blog URL setting like http://localhost/blog_id/
|
you must use the _blog_id_ with the trailing slash in blog URL setting like http://localhost/blog_id/
|
||||||
|
|
||||||
__Web server configuration__
|
__Standard configuration by subdomains__
|
||||||
|
|
||||||
To customized web server configuration for subfolders, edit:
|
|
||||||
|
|
||||||
> /var/www/dotclear/app/servers/subfolder.conf
|
|
||||||
|
|
||||||
Original contents looks like:
|
|
||||||
|
|
||||||
server {
|
|
||||||
server_name localhost;
|
|
||||||
include /etc/nginx/snippets/snippets_subfolder.conf;
|
|
||||||
include /etc/nginx/snippets/snippets_common.conf;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### 3.4.2 Standard configuration by subdomains
|
|
||||||
|
|
||||||
These images use Dotclear URL rewriting in PATH INFO mode.
|
These images use Dotclear URL rewriting in PATH INFO mode.
|
||||||
By default URL and path should be corrected by a custom plugin automatically.
|
By default URL and path should be corrected by a custom plugin automatically.
|
||||||
|
@ -218,28 +182,7 @@ Blogs administration is available at http://xxx.domain.tld/admin
|
||||||
When you create a new blog in this configuration,
|
When you create a new blog in this configuration,
|
||||||
you must use the _blog_id_ as subdomain in blog URL setting like http://blog_id.domain.tld/
|
you must use the _blog_id_ as subdomain in blog URL setting like http://blog_id.domain.tld/
|
||||||
|
|
||||||
__Web server configuration__
|
__Non standard configuration__
|
||||||
|
|
||||||
To customized web server configuration for subdomains, edit:
|
|
||||||
|
|
||||||
> /var/www/dotclear/app/servers/subdomain.conf
|
|
||||||
|
|
||||||
Original contents looks like:
|
|
||||||
|
|
||||||
server {
|
|
||||||
server_name ~^(?<dc_blog_id>\w*?)?\.?(\w+\.\w+)$;
|
|
||||||
if ($dc_blog_id = '') {
|
|
||||||
set $dc_blog_id default;
|
|
||||||
}
|
|
||||||
if ($dc_blog_id = 'blog') {
|
|
||||||
set $dc_blog_id default;
|
|
||||||
}
|
|
||||||
include /etc/nginx/snippets/snippets_subdomain.conf;
|
|
||||||
include /etc/nginx/snippets/snippets_common.conf;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#### 3.4.3 Non standard configuration
|
|
||||||
|
|
||||||
Setup nginx server configuration (see bellow):
|
Setup nginx server configuration (see bellow):
|
||||||
|
|
||||||
|
@ -261,8 +204,7 @@ Then fix public_path and public_url for the blog:
|
||||||
* set _public_path_ to the real path on system to public directory of the blog
|
* 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
|
* set _public_url_ to the URL of the public directory of the blog
|
||||||
|
|
||||||
|
### STRUCTURE
|
||||||
### 3.5 STRUCTURE
|
|
||||||
|
|
||||||
Default root path of this image structure is in __/var/www/dotclear__ with sub folders:
|
Default root path of this image structure is in __/var/www/dotclear__ with sub folders:
|
||||||
|
|
||||||
|
@ -274,29 +216,23 @@ Default root path of this image structure is in __/var/www/dotclear__ with sub f
|
||||||
* _themes_ : Dotclear themes directory
|
* _themes_ : Dotclear themes directory
|
||||||
* _var_ : Dotclear var directory
|
* _var_ : Dotclear var directory
|
||||||
|
|
||||||
|
### UPGRADE
|
||||||
|
|
||||||
### 3.6 UPGRADE
|
To upgrade Dotclear to next version,
|
||||||
|
it is recommanded to pull latest image and restart the docker container
|
||||||
To upgrade Dotclear to next version it is recommanded to pull latest image and restart the docker container:
|
|
||||||
|
|
||||||
docker pull jcpd/docker-dotclear:latest && docker compose up -d
|
|
||||||
|
|
||||||
or use Dotclear buitin update system but themes wiil not be updated.
|
or use Dotclear buitin update system but themes wiil not be updated.
|
||||||
|
|
||||||
|
### TODO
|
||||||
### 4. TODO
|
|
||||||
|
|
||||||
* Add better cache management. From another container or from Dotclear container.
|
* Add better cache management. From another container or from Dotclear container.
|
||||||
* Add mail support.
|
* Add mail support.
|
||||||
|
|
||||||
|
### CONTRIBUTING
|
||||||
### 5. CONTRIBUTING
|
|
||||||
|
|
||||||
This image is an open source project. If you'd like to contribute, please read the [CONTRIBUTING file](/CONTRIBUTING.md).
|
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.
|
You can submit a pull request, or feel free to use any other way you'd prefer.
|
||||||
|
|
||||||
|
### LICENSE
|
||||||
### 6. LICENSE
|
|
||||||
|
|
||||||
Copyright Jean-Christian Paul Denis
|
Copyright Jean-Christian Paul Denis
|
||||||
AGPL-v3 <https://www.gnu.org/licenses/agpl-3.0.html>
|
AGPL-v3 <https://www.gnu.org/licenses/agpl-3.0.html>
|
||||||
|
|
|
@ -16,24 +16,12 @@ fi
|
||||||
export COMPARE_IMAGE=$(sed -n "${COMPARE_HAYSTACK}" /usr/src/dotclear/release.json)
|
export COMPARE_IMAGE=$(sed -n "${COMPARE_HAYSTACK}" /usr/src/dotclear/release.json)
|
||||||
export VERSION_IMAGE=$(sed -n "s/^\s*\"release_version\":\s*\"\(.*\)\",/\1/p" /usr/src/dotclear/release.json)
|
export VERSION_IMAGE=$(sed -n "s/^\s*\"release_version\":\s*\"\(.*\)\",/\1/p" /usr/src/dotclear/release.json)
|
||||||
|
|
||||||
# Simple versions comparison function that fits all releases
|
# Simple versions comparison function that works with Dotclear stable versioning
|
||||||
function version { echo "$@" | awk -F. '{ printf("%d%04d%03d\n", $1,$2,$3); }'; }
|
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
|
||||||
|
|
||||||
# Update Docker structure
|
# Update Docker structure
|
||||||
echo >&2 "Updating Docker structure..."
|
echo >&2 "Updating Docker structure..."
|
||||||
mkdir -p /var/www/dotclear/app \
|
cp -Ru /var/lib/dotclear /var/www
|
||||||
/var/www/dotclear/blogs \
|
|
||||||
/var/www/dotclear/blogs/default \
|
|
||||||
/var/www/dotclear/cache \
|
|
||||||
/var/www/dotclear/plugins \
|
|
||||||
/var/www/dotclear/servers \
|
|
||||||
/var/www/dotclear/themes \
|
|
||||||
/var/www/dotclear/var
|
|
||||||
# Always replace image plugins
|
|
||||||
cp -rf /var/lib/dotclear/plugins/* /var/www/dotclear/plugins
|
|
||||||
# Copy nginx server conf only if not exists
|
|
||||||
cp -n /var/lib/dotclear/servers/subdomain.conf /var/www/dotclear/servers/
|
|
||||||
cp -n /var/lib/dotclear/servers/subfolder.conf /var/www/dotclear/servers/
|
|
||||||
|
|
||||||
# Check if Dotclear is already on system
|
# Check if Dotclear is already on system
|
||||||
if ! [ -e index.php -a -e src/App.php ]; then
|
if ! [ -e index.php -a -e src/App.php ]; then
|
||||||
|
@ -62,7 +50,7 @@ fi
|
||||||
|
|
||||||
# Update Docker structure
|
# Update Docker structure
|
||||||
echo >&2 "Updating Dotclear common themes..."
|
echo >&2 "Updating Dotclear common themes..."
|
||||||
cp -rf /var/www/dotclear/app/themes/* /var/www/dotclear/themes
|
cp -Ru /var/www/dotclear/app/themes/* /var/www/dotclear/themes
|
||||||
|
|
||||||
# DEBUG mode for non stable releases
|
# DEBUG mode for non stable releases
|
||||||
if [ "$CNL_DOTCLEAR" == "stable" ]; then
|
if [ "$CNL_DOTCLEAR" == "stable" ]; then
|
||||||
|
|
2
www/blogs/index.php
Normal file
2
www/blogs/index.php
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
header('Location: /default');
|
Loading…
Reference in a new issue