Developer information
November 15, 2017 ยท View on GitHub
Installation instructions
The following instructions will get you up and running with the gnome-app.
Note, the instructions have only been tested on OSX.
Installing dependencies
- Install docker toolbox
- Create a docker machine named default:
docker-machine create --driver virtualbox default - Print docker environment variables and source them:
eval $(docker-machine env) - Give docker VM enough memory, we use 4096MB. In order to do so, you need to stop the docker VM
docker-machine stop default.
- Create a docker machine named default:
- Install node or run
brew install nodeif you have brew installed. - Install cordova globally:
npm install -g cordova- note: on OSX cordova might need needs special permissions on ~/.config folder
- Install dependencies
- Navigate to the api directory and run
npm install - Navigate to the ionic-app directory and run
npm install
- Navigate to the api directory and run
- Go to the ionic-app directory and:
- Run
ionic state resetto install platforms and cordova plugins. - Run
ionic resourcesto build splash screen, app icon etc.
- Run
Nice one! At this point you have all the dependencies installed and you are ready to rock.
Environment variables
The environment variables need to be set for various tools and integrations. Do the following:
- Rename environment.example to environment
cp environment.example environment - If you are a core contributor, talk to Jonathan. Otherwise, add your environment variables in
environment.
The most important variable is NEO4J_AUTH - you must setting it before you continue. The username you cannot change, but feel free to update the password.
NEO4J_AUTH=neo4j/somepassword
Make sure you export them to the current shell export NEO4J_AUTH=neo4j/something.
Development commands
We are using docker to run neo4j, rabbitmq, and our applications. This means you won't have to install any dependencies apart from docker.
At this point, it is time to tune into this song and run the below commands. Feel free to sing along to the chorus while your shell happily runs the commands. Commands need to be run from project root.
Api commands:
- Build a new container including the latest source and dist files:
npm run api:build - Run api tests:
npm run api:test. If tests fail at this point, it is likely that some of the environment variables are incorrect. - Run the api on port 3000:
npm run api:run. If you head over tohttp://docker-machine-ip:3000you will see the api up and running. In order to obtain the docker-machine-ip, rundocker envand peak on DOCKER_HOST.
The first times you run the above commands, they might take longer than
App commands:
- Build a container, containing the application:
npm run app:build - Wipe container state:
npm run app:clean - Run app unit tests:
npm run app:test - Run app e2e tests:
npm run app:e2e
General advice
- To manage container we use
docker-machineor Kinematic (comes with the Docker toolbox). - If you have any questions, feel free to reach out.