You can serve the site through docker or natively on your machine.
docker build --tag codurance-site:local -f ./Dockerfile-local .
docker run -i -t -v `pwd`:/site -p 4000:4000 codurance-site:local
You need to execute the following command to prepare an image and run a container:
# you need to do this only once - this builds the container with all the dependencies for running the site
docker build --tag codurance-site:local -f ./Dockerfile-local .
# you need to run this every time you want to stand up the local server - it should watch for changes in the local files automatically though
docker run -i -t -v `pwd`:/site -p 4000:4000 codurance-site:local
If you want to run a different rake target on the container start use:
docker run -i -t -v `pwd`:/site -p 4000:4000 -e RAKE_TARGET="your_target" codurance-site:local
- install rvm https://rvm.io/
rvm install ruby
rvm use ruby
gem install bundler
bundle install
run locally:
bundle exec rake servequick
In case of other problems, refer to the troubleshooting section.
- Remember to add the tag
asset-type: post
to the post metadata
- See Jenkins example post, especially the
abstract
field. - Note: comments can only be single line
- Note: Even if they are too long, they'll be cut to 30 words
- Add an md file to the folder:
videos/_posts
(You can use older videos post as a template) - Do not forget the attribute
video-url
, for youtube videos, use following format: https://www.youtube.com/embed/ - Add an image to the video, for youtube videos, make a screenshot here, the image is used on the home page and the carousel. The image is to be saved under
/assets/custom/img/videos/
We have a bot that makes a preview of the site for every branch that you create.
If you don't have a PR, you can just replace the branch name in the link below:
http://codurance-site-pr.s3-website-eu-west-1.amazonaws.com/site-[branch-name]
This problem happens with Linux systems:
header files for ruby at /usr/lib/ruby/include/ruby.h not found
in case ruby-dev
package is not installed:
sudo apt-get install ruby-dev
zlib
is necessary for building libxml2
:
sudo apt-get install zlib1g-dev
If other things don't make sense - follow this guide to clear out your cached gems and start the process again: https://coderwall.com/p/x3z2ag/cleanup-rvm