_clients | ||
_coops | ||
_includes | ||
_layouts | ||
_services | ||
_technologies | ||
_uploads | ||
docker/web | ||
images | ||
scripts | ||
_config.yml | ||
.gitignore | ||
.gitlab-ci.yml | ||
.htaccess | ||
.ruby-version | ||
about.md | ||
docker-compose.yml | ||
favicon.ico | ||
Gemfile | ||
Gemfile.lock | ||
index.html | ||
join.md | ||
manifesto.md | ||
README.md |
CoTech Website
Introduction
This is a port of the current Wordpress version of the CoTech Website to a statically-generated site using Jekyll.
Run the site locally
You can run the site on your computer as if it were live online using Jekyll. You will need git
and ruby
installed on your machine to do this. Then clone the repository
... using docker
Make sure you have docker (CE is fine) installed and running, and docker-compose installed, then:
git clone git@git.coop:cotech/website.git
cd website
docker-compose up -d
And visit localhost:4000 to view the site.
There are two docker volumes used here:
vendor
- caches the ruby gems even if you recreate the containerssite
- holds the built site files to share them with httpd (and not clutter your local filesystem)
A few useful things you might want to do:
# check the status of the containers
docker-compose ps
# stop all the containers (but don't remove them)
docker-compose stop
# stop and remove the containers (but leave the volumes)
docker-compose down
# remove everything
docker-compose down -v
# bring it back to life from any state you happen to be in
docker-compose up -d
# run some ruby/bundler commands
docker-compose run jekyll bundle --version
docker-compose run jekyll bundle update
docker-compose run jekyll bundle exec jekyll --help
... directly on your machine
Install the dependencies for the project
git clone git@git.coop:cotech/website.git
cd website
gem install bundler
bundle install
Run a local web server so that you can view the site
bundle exec jekyll server
And visit localhost:4000 to view the site.
Note: not all the images will load as there is no .htaccess
support locally
Deployment
Dev/Staging
When changes are committed to the master
branch the .gitlab-ci.yml
file triggers the building of the site and then the copying of the results to dev.coops.tech.
Production
You need to manually deploy the changes from dev to production.
-
View the changes on dev.coops.tech and ensure you're happy for them to be pushed to production.
-
Visit GitLab environments. NOTE. If you don't have access to the environments page then post a message in the Website category of the CoTech forum to ask someone to do it for you.
-
Click the "Play" icon on the right of the screen in the row for the "dev" environment and choose "deploy:production".
-
Your changes will be visible in production when the commit listed in the "production" environment row matches the commit listed in the "dev" environment row.
Contributing
There's a list of bugs and improvements in the repository. Feel free to add more, discuss or claim any of these issues to work on.