PHP CSS JavaScript HTML Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Build Status

Cooperative Technologists Website

Editing Content

For content that cannot be edited on the Wordpress Admin interface, please see:

For example, frontPage.php.

Wiki Documentation

Please see more information on the wiki.

Hack On It

Firstly, install docker

Then, get docker-compose installed.

Finally, run the following magic incantation:

$ docker-compose up

Get Latest Images

Manually update the latest images with the following magic incantation:

$ docker-compose exec assets / --force

How The Deployment Works

Currently the live and dev sites are running on Werbarchitects shared hosting.

Changes to the dev branch are automatically applied to the dev site.

This works via a crontab which runs a script which checks for changes and if there are any then it runs the update script.

The live site is set up exactly the same way but tracking the master branch.

If the dev site images and database needs syncing from the live site then please contact and ask him to run the live2dev Ansible playbook.

Getting Deployment Machine Access

Ask to add your SSH public keys to the server and to email you the MySQL login details.

When you have SSH access, you can then:

$ ssh

The site is in ~/sites/web, add yourself to ~/.forward if you wish to get emails.

If you want to change the crontab, please make changes over here.

Querying the WordPress database directly

Even though the format of the WordPress database is pretty horrible you can perform analytics queries on a local copy of the database which can be downloaded from the admin section of the site if you have Admin permissions.

e.g. to get the names and email addresses of co-ops that have not entered a turnover so you can nag them:

    SELECT post_id,  post_title, meta_value as turnover
    FROM `wp_postmeta` LEFT JOIN wp_posts on post_id = ID
    where meta_key = 'turnover'
    and post_status = 'publish'
    and meta_value = "") as noturnover
LEFT JOIN wp_postmeta on noturnover.post_id = wp_postmeta.post_id
where meta_value REGEXP  '^[^@]+@[^@]+\.[^@]{2,}$'