-
Notifications
You must be signed in to change notification settings - Fork 0
Local Development
Note: until the containers in the 'containers' repository are in a public docker registry, you'll need to build them locally. The 'containers' repository needs to be cloned in the same directory as the 'code' repository.
- docker
- bash
1. Clone 'code' repository
git clone [email protected]:timetabio/code.git
2. Clone 'containers' repository
git clone [email protected]:timetabio/containers.git
3. First start
cd code
./scripts/setup.sh # clones config repository
./scripts/dev.sh --build # Builds containers
./scripts/rake.sh # Builds autoloaders, css, js...
./scripts/dev.sh --bootstrap # Starts & bootstraps containers
4. Hosts
Add the following line to your /etc/hosts
(or equivalent)
127.0.0.1 devapi.timetab.io dev.timetab.io coverage.timetab.io showcase.timetab.io
5. Configuration
TODO
This script is used during development to orchestrate the docker containers and manage elasticsearch, postgres and redis.
Usage: ./scripts/dev.sh OPTION [...OPTIONS]
Options:
--help Show this help
--stop Stops all containers
--start Starts all containers
--restarts Restarts all containers
--worker Restarts worker
--build Builds dev containers
--reset-elastic Resets elasticsearch
--schema Bootstraps schemas (elastic, postgres)
--patch Apply SQL patches
--bootstrap Shortcut for (--build, --schema and --restart)
--cleanup Deletes sessions, tokens
dev.sh
supports the loading of an rc-file named .devrc
located in the repository root.
Currently .devrc
only supports setting the amount of worker instances:
#!/bin/sh
WORKER_INSTANCES=12
This script executes rake
inside our build container.
The most important commands are in a nutshell:
-
./scripts/rake.sh
- Builds the whole project -
./scripts/rake.sh clean
- Cleans all built files -
./scripts/rake.sh <lowercase folder>
- Only builds a sub-part of the project (e.g.styles
,frontend
, ...)