Giter VIP home page Giter VIP logo

classicpress-docker's Introduction

ClassicPress in Docker Image

Quote from www.classicpress.net:

ClassicPress is a community-led open source content management system and a fork of WordPress that preserves the TinyMCE classic editor as the default option.

Changelog

Open changelog

Tags

Convention

Tagging convention is: CLASIC_PRESS_VERSION-rRELEASE

CLASIC_PRESS_VERSION is ClassicPress version, RELEASE is Docker Image release number. Eg. 1.7.1-r1.

Basic Information

  • The image is based on Alpine 3.16 and php 8.0 (3.16 is a bit old, but it's last version having php8.0 which is required by ClassicPress 1.x)
  • Some code taken from TrafeX/docker-php-nginx:2.5.0 which I highly recommend! Unfortunatelly I coudln't use it (inherit) because Docker has no mechanism to "unexpose" port and remove health check
  • Thanks to Alpine + Nginx + php-fpm, the image is using only around ~40MB of RAM
  • Has enabled all required and recommended php extensions for WordPress
  • Basic security hardening done
  • Support for Docker Secrets via env variables with _FILE suffix

Note: Even with basic hardening done, it's highly recommended to not to expose a container directly to the outside world. Consider using a reverse proxy like traefik or Nginx Proxy Manager.

Current

https://hub.docker.com/r/marverix/classicpress/tags

Usage

Good Docker practice is that one service/server == one docker container, this is why you will still need to run separate container with a database (MySQL/MariaDB).

Write Permission

This image deals with write access shared between host and the container by group press (and user) with ID 2048. This is why your user running the container must be in this group.

If you are running Debian/Ubuntu-based run on your host machine:

sudo groupadd -g 2048 press
sudo usermod $(whoami) -aG press

Read more:

With Docker Compose

You will need to create own docker-compose.yaml file. As a start point, you can use docker-compose.example.yaml and myblog-env-example. Then simply run:

docker-compose -f docker-compose.example.yaml --env-file=myblog-env-example up

Manually

  1. Create network

    docker network create --driver bridge classicpress_network
  2. Set up MariaDB/MySQL:

    docker volume create mariadb_data
    docker run \
        --detach \
        --name mariadb \
        --volume mariadb_data:/var/lib/mysql \
        --env MARIADB_DATABASE=myblog_db \
        --env MARIADB_USER=myblog_user \
        --env MARIADB_PASSWORD=my_secret_passowrd \
        --env MARIADB_ROOT_PASSWORD=my_turbo_secret_password \
        --restart=unless-stopped \
        mariadb:10.7.3
  3. Create a volume where will be stored config and data.

    docker volume create myblog_data
  4. Run

    docker run \
        --detach \
        --expose 80:80 \
        --name myblog \
        --volume myblog_data:/data \
        --env CP_DB_NAME=myblog_db \
        --env CP_DB_USER=myblog_user \
        --env CP_DB_PASSWORD=my_secret_passowrd \
        --env CP_DB_HOST=mariadb \
        --restart=unless-stopped \
        marverix/classicpress:latest

Development

How-to is described in a separate document.

classicpress-docker's People

Contributors

marverix avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

classicpress-docker's Issues

ClassicPress v1.5.0

Just wanted to give you heads-up. ClassicPress v1.5.0 is out with PHP 8.0 support.

ARM64 Build

Hello!

Is possible to add an arm64 build?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.