Ginger: awesome semantic CMS built on Zotonic
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Add Docker development environment (#59) Jun 21, 2016
docker/prod [docker] Build driebit/ginger from main repo (#362) Feb 13, 2018
docs [base] Add range facet to search API (#447) Dec 3, 2018
modules Do not provide default for email when resetting (#506) Dec 12, 2018
scripts [base] Split REST controller (#492) Nov 28, 2018
sites Ginger says hello Jun 2, 2014
skel Update versions in package.json (#501) Dec 7, 2018
tests [tests] Define "should not see" as either invisible or completely absent Jun 26, 2017
.dockerignore [docker] Build driebit/ginger from main repo (#362) Feb 13, 2018
.editorconfig Add Docker development environment (#59) Jun 21, 2016
.env Add Docker development environment (#59) Jun 21, 2016
.gitignore [base] Add make target to create API doc (#438) Sep 10, 2018
.jshintrc Unify coding styles Jul 7, 2014
.travis.yml Run all tests on CI (#481) Nov 28, 2018
CHANGELOG.md Update changelog Oct 14, 2015
CONTRIBUTING.md Add CONTRIBUTING.md May 26, 2016
LICENSE Add license (fix #118) Jun 16, 2016
Makefile Run all tests on CI (#481) Nov 28, 2018
README.md [docker] Add make prompt for running tests repeatedly Jun 18, 2018
docker-compose.yml Run all tests on CI (#481) Nov 28, 2018
docker-compose.zotonic.yml Expose Postgres port in docker-compose setup. Sep 4, 2017
package-lock.json [base] Add make target to create API doc (#438) Sep 10, 2018
package.json [base] Add make target to create API doc (#438) Sep 10, 2018

README.md

Build Status

Ginger

This is the Ginger Zotonic edition. This repository contains:

  • (most) Ginger modules
  • Docker configuration
  • shell scripts

Documentation

Getting started

Clone this repository and install Docker.

Then open a terminal in the Ginger directory and start the containers:

$ make up

To open a Zotonic shell:

$ make shell

To run Gulp in the Ginger directory:

$ make gulp site=your_site_name

To run the tests for a module, e.g. mod_ginger_collection:

$ docker-compose run zotonic bin/zotonic runtests mod_ginger_collection

If you want to run tests repeatedly, it may be easier to open a shell in a clean Zotonic container:

$ make prompt

and then make and run the tests:

$ make && bin/zotonic runtests mod_ginger_collection

For more, see the Docker doc chapter.

Sites overview

  • The Zotonic status site is available at http://localhost. Log in with empty password.
  • Make sure to add the hostnames of individual sites (e.g. yoursite.docker.test) to your /etc/hosts file.

Checking out sites

  1. Check out your Zotonic site in the sites/ directory.
  2. Start the site from the status site: http://localhost.
  3. Login and go to the modules page
  4. Deactive site module and activate it again
  5. Now the site should work properly

Adding modules

Place custom modules in modules/ (no symlinks needed).

Fetching changes

$ git fetch
$ git rebase

Making changes

Commit messages

Please follow the Driebit guidelines for commit messages. Additionally, prefix your message with the module that your change applies to. For instance:

[admin] Fix login form styling
[foundation] Add carousel template

Bugfixes to the release branch

When you are fixing a bug in the current release branch (as it is published on ginger-test or ginger-acceptatie):

  1. Fetch changes: $ git fetch.
  2. View branches: $ git branch -a.
  3. Switch to the latest release branch: $ git checkout release-0.1.0.
  4. Make, commit and push your changes.
  5. Optionally, update ginger-test with the your changes to the release branch:
$ ssh ginger-test.driebit.net
$ cd /srv/zotonic/
$ z git pull
$ z zotonic shell
$ z:m().
  1. Optionally, the release branch to master:
git checkout master
git pull
git merge release-0.#.0 (latest release branch)
git push

Feature developments

When working on (larger) features and fixes that should not be part of the current release:

  1. Fetch changes: $ git fetch.
  2. Switch to master: $ git checkout master.
  3. Make, commit and push your changes.

Deploying sites

To deploy a site, log in to the proper server (ginger-test.driebit.net, ginger-acceptatie.driebit.net or ginger01.driebit.net):

$ ssh ginger-test.driebit.net
$ cd /srv/zotonic/sites/[site name]

Check the current Git branch, then pull the latest changes:

$ z git pull

Then compile the changes and flush the site:

$ z zotonic shell
$ z:compile(), z:flush([site name]).

License

Ginger is released under the Apache 2.0 License. See the included LICENSE file for more information.