Git Product home page Git Product logo

concrete5's Introduction

Concrete5 for Docker

Docker image of Concrete5 on Debian Buster with Apache2.4 and PHP 7

This image has been updated and tested with version 8.5.1 of Concrete5. (Note, that the name on Docker Hub is concrete5.7, as the repository name cannot be changed.)

Concrete5

Concrete5 is an easy to use web content management system

Concrete5 was designed for ease of use, for users with a minimum of technical skills. It features in-context editing (the ability to edit website content directly on the page, rather than in an administrative interface). Editable areas are defined in concrete5 templates which allow editors to insert 'blocks' of content. These can contain simple content (text and images) or have more complex functionality, for example image slideshows, comments systems, lists of files, maps etc. Further addons can be installed from the concrete5 Marketplace to extend the range of blocks available for insertion. Websites running concrete5 can be connected to the concrete5 website, allowing automatic upgrading of the core software and of any addons downloaded or purchased from the Marketplace.

Quickstart:

Create a minimal Data Container

MariaDB will use the initially empty /var/lib/mysql directory and Concrete5 will use /var/www/html and /etc/apache2, which will be populated by the docker-entrypoint script.

docker create -it --name c5_DATA_1 \
-v /var/lib/mysql \
-v /var/www/html \
-v /etc/apache2 \
tianon/true true

The container does not need to be started or running for sharing its data.

Create a Database

This initializes one database for use with Concrete5. Remember replacing the the_root_password and the_db_user_password with real passwords.

docker run -d --name db \
--restart=always \
--volumes-from c5_DATA_1 \
-e MYSQL_ROOT_PASSWORD=the_db_root_password \
-e MYSQL_USER=c5dbadmin \
-e MYSQL_PASSWORD=the_db_user_password \
-e MYSQL_DATABASE=c5db \
mariadb

Run Concrete5

It will be linked to the MariaDB: The link between the c5_db and the c5_web container causes the /etc/hosts file in the Concrete5 container to be continually updated with the current IP of the c5_db container.

docker run -d --name=c5_web_1 \
--restart=always \
--volumes-from c5_DATA_1 \
--link db:db \
-p 80:80 \
-p 443:443 \
chriswayg/concrete5.7

Docker-Compose

Alternatively to the above, using docker-compose create the data-volume, database and Concrete5.7 containers all in one step, as can be seen in docker-compose-datavol.yml. Or if you prefer, use host volumes as shown below:

$ cd c5
$ cat docker-compose.yml

db:
  image: mariadb
  restart: always
  environment:
  - MYSQL_ROOT_PASSWORD=the_db_root_password
  - MYSQL_USER=c5dbadmin
  - MYSQL_PASSWORD=the_db_user_password
  - MYSQL_DATABASE=c5db
  # host volume
  volumes:
    - ./data/var/lib/mysql:/var/lib/mysql

web:
  image: chriswayg/concrete5.7
  restart: always
  ports:
  - "80:80"
  - "443:443"
  links:
  - db
  # host volumes 
  volumes:
    - ./data/etc/apache2:/etc/apache2
    - ./data/var/www/html:/var/www/html
  
$ docker-compose up -d

Concrete5 Setup

Visit your Concrete5 site at https://example.org for initial setup.

On the setup page, set your site-name and admin user password and enter the following

	Database Information:
	Server:          db
	MySQL Username:  c5dbadmin
	MySQL Password:  the_db_user_password
	Database Name:   c5db

Data will persist

The Concrete5 and MariaDB application containers can be removed (even with docker rm -f -v), upgraded and reinitialized without loosing website or database data, as all website data is stored in the DATA container. (Just do not delete the DATA container;)

To find out where the data is stored on disk, check with docker inspect c5_DATA_1 | grep -A1 Source

Common Tasks

Change a Theme's file

Enter the Concrete5 docker container, locate the relevant css file & make changes - for examle something like...

$ docker exec -it c5_web_1 bash
$ nano ./packages/theme_mytheme/themes/mytheme/css/style.css
$ exit

In Concrete5, clear the cache and reload the page.

Backup Containers with Data in Volumes

If you are storing your data in Docker volume containers, take a look at the docker-clone script: It will clone a set of containers including all its data. There is more info regarding it here on stackoverflow. The docker-clone script still needs to be complemented to be more generally useful beyond this project. It is heavily commented, so try it out and see, if it meets your needs. I would welcome any suggestions for improvements.

Database management or fix problems with phpMyAdmin

docker run --rm --link c5_db_1:mysql -p 12345:80 nazarpc/phpmyadmin

Login as MYSQL_USER with your password in MYSQL_PASSWORD.


License:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

concrete5's People

Contributors

chriswayg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

concrete5's Issues

Failing to start concrete5

(newbie here so please excuse errors)
I'm having a go at getting concrete5 running in a docker container and I'm following your commands letter by letter (besides changing mysql passwords) and it keeps failing on running concrete5 with this error:

Error response from daemon: Could not get container for db

Any ideas?

Running Linux Mint with i3 window manager.

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.