Skip to content
Development environment for Meedan Check, a collaborative media annotation app
Shell Dockerfile
Branch: develop
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
alegre @ 7e6b6de Update docker-compose approach for simpler config Aug 2, 2019
bin Prune remote branches Mar 24, 2019
check-api @ 1753d86 Update docker-compose approach for simpler config Aug 2, 2019
check-bots @ 2370a69 Add check-bots to docker-compose Aug 8, 2019
check-mark @ 2998c5a Add check-bots to docker-compose Aug 8, 2019
check-slack-bot @ 3cc864c Rename check-bot to check-slack-bot and add check-bots Aug 7, 2019
check-web @ 24e7f90 Update docker-compose approach for simpler config Aug 2, 2019
chromedriver Update docker-compose approach for simpler config Aug 2, 2019
geckodriver Update docker-compose approach for simpler config Aug 2, 2019
montage-web @ 527396f Update docker-compose approach for simpler config Aug 2, 2019
pender @ e1d8d05 Add check-bots to docker-compose Aug 8, 2019
vframe @ 9b18bca Update docker-compose approach for simpler config Aug 2, 2019
.gitignore Update submodules and ignore configurator Sep 12, 2017
.gitmodules Rename check-bot to check-slack-bot and add check-bots Aug 7, 2019
LICENSE.txt Add license May 31, 2019
README.md Update docker-compose approach for simpler config Aug 2, 2019
diagram.png Updating Check diagram: Check API now talks to MinIO and Check Bot wa… Aug 14, 2019
diagram.svg Updating Check diagram: Check API now talks to MinIO and Check Bot wa… Aug 14, 2019
docker-compose.yml Add check-bots to docker-compose Aug 8, 2019
docker-test.yml Update docker-compose approach for simpler config Aug 2, 2019
elasticsearch.yml Update docker-compose files to work with data containers Oct 21, 2018
postgresql.conf Update docker-compose files to work with data containers Oct 21, 2018

README.md

Check

Verify breaking news online

This is a Docker Compose configuration that spins up the whole Check app locally. Tested on Linux and Mac OS X (with Docker for Mac). The repo contains two Docker Compose files, one for development (docker-compose.yml) and the other for testing (docker-test.yml).

Diagram

DO NOT USE IN PRODUCTION! THIS IS ONLY MEANT AS A DEVELOPMENT ENVIRONMENT.

  • Install docker-compose
  • git clone --recursive git@github.com:meedan/check.git && cd check
  • Configuration: copy and edit the *.example files in the submodules
  • Update your virtual memory settings, e.g. by setting vm.max_map_count=262144 in /etc/sysctl.conf
  • docker-compose build && docker-compose up

Available services and container names

Testing

  • Start the app in test mode: docker-compose -f docker-compose.yml -f docker-test.yml up
  • Check web client: docker-compose exec web npm run test
  • Check browser extension: docker-compose exec mark npm run test
  • Check service API: docker-compose exec api bundle exec rake test
  • Pender service API: docker-compose exec pender bundle exec rake test
  • Running a specific Check web client test: docker-compose exec web bash -c "cd test && rspec --example KEYWORD spec/integration_spec.rb"
  • Running a specific Check API or Pender test (from within the container): ruby -I"lib:test" test/path/to/specific_test.rb -n /.*KEYWORD.*/

Helpful one-liners and scripts

  • Build the web client bundle: docker-compose run web npm run build
  • Build the browser extension: docker-compose run mark npm run build
  • Build the Android application: docker-compose run mark npm run generate-apk
  • Build the Slack bot: docker-compose run bot npm run build
  • Build the Montage web client bundle: docker-compose run montage npm run build
  • Watch for changes and build the Montage web client automatically when something changes: docker-compose run montage npm run build:dev
  • Restart a service, e.g. Check API: docker-compose run api bash -c "touch tmp/restart.txt"
  • Invoke the Rails console on a service, e.g. Check API: docker-compose run api bundle exec rails c d
  • Reset the api database while the app is down: docker-compose run api bundle exec rake db:drop db:create db:migrate
  • Update submodules to their latest commit: ./bin/git-update.sh
  • Cleanup docker images and volumes: docker system prune -af (best done while the app is up to avoid rebuilding the images later)
  • Packing your local config files: ./bin/tar-config.sh
  • Run a standalone image, e.g. Pender: docker run -e SERVER_PORT=3200 -e RAILS_ENV=test -p 3200:3200 -v /absolute/path/to/check-app/pender:/app check_pender
  • Update the automatic documentation of Check API: docker-compose exec api bash -c "cd doc && make clean && make"

More documentation

Troubleshooting and known issues

  • Upon initial installation, the submodules may be checked out at a specific commit instead of the develop branch. You will need to go into each submodule and issue an explicit git checkout develop.
  • Upon initial installation, to make sure the frontend is up to date, issue an explicit docker-compose exec web npm run build and docker-compose exec montage npm run build.
You can’t perform that action at this time.