Public Repository

Last pushed: 2 years ago
Short Description
A Docker Container for CoderDojo Zen platform. Designed for Local development and testing of code.
Full Description

A Docker Container for CoderDojo Zen platform. Designed for Local development and testing of code. The Container is setup to auto start a postgres server and launch the zen services. It'll then run the e2e test on your code.

Prerequisites

  • Docker
  • Zen Code
  • Postgresql (not needed for testing unless you want to use your own data set or have consistency of the data)
    • add listen_addresses = '*' to postgresql.conf
    • add host all all 172.17.0.0/16 ident to pg_hba.conf

Setup

  • Run the docker container docker run -ti -p 4567:4567 -v ~/cp-local-development:/home/jos/code butlerx/coderdojo-local-zen /bin/bash
  • ctrl-c
  • cd /home/jos/code
  • su jos
  • ./localdev.js init zen
  • ctrl- d to exit the container

Then you're ready to run the code

Run the Code

To start the service

docker run -ti \
  -p 8000:8000 \
  -p 4567:4567 \
  -p 5432:5432 \
  -v ~/cp-local-development:/home/jos/code \
  butlerx/coderdojo-local-zen /bin/bash

To run the code with your own database
first change localhost to database in cp-local-development/system.js

docker run -ti  \
  -p 8000:8000 \
  -p 4567:4567 \
  --add-host=database:172.17.0.1 \
  -v ~/cp-local-development:/home/jos/code \
  butlerx/coderdojo-local-zen /bin/bash

This is not currently built using a dockerfile but is planned to replace it

Docker Pull Command
Owner
butlerx