A open source developer community to promote local hackathons, conferences, and meetups, mentoring, calls for speakers, and collaboration.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
- Docker - Used to build, ship, and run all services
- Python - Dependency Management
- Node - Used to generate RSS Feeds
The following steps will check out the repository, install the dependencies needed for the React frontend and run the service on http://localhost
.
$ git clone https://github.com/apoclyps/my-dev-space
$ cd my-dev-space
$ docker-compose -f docker-compose-dev.yml up -d
Once the service is up and running, you will need to manually create the required tables in the database and install the optional seed data to complete the local Postgres setup.
$ docker-compose -f docker-compose-dev.yml run users-service python manage.py recreate_db
$ docker-compose -f docker-compose-dev.yml run users-service python manage.py seed_db
$ docker-compose -f docker-compose-dev.yml run events-service python manage.py recreate_db
On subsequent runs (when the above steps have been completed), you can apply new database migrations to your local service by running:
$ docker-compose -f docker-compose-dev.yml run users-service python manage.py db upgrade
$ docker-compose -f docker-compose-dev.yml run events-service python manage.py db upgrade
Alternatively, if you make a change to a model during development, you will need to create and commit a migration file for that service. As a best practice, migration files should be committed independently to code:
$ docker-compose -f docker-compose-dev.yml run users-service python manage.py db migrate
$ docker-compose -f docker-compose-dev.yml run events-service python manage.py db migrate
To load data into the service for development, the recommended solution is to use the load script within the scripts
folder to populate the local database. Details on how to configure the script can be found in scripts/README.md
.
`./load_data.sh dev`
And to tear down the local development stack, simply run:
$ docker-compose -f docker-compose-dev.yml down
If you wish to populate your local database with events from external services, you can use the steps outlined in the scripts README.
The following will run the unit tests for each respective service:
$ docker-compose -f docker-compose-dev.yml run client-test npm test
$ docker-compose -f docker-compose-dev.yml run users-service python manage.py test
$ docker-compose -f docker-compose-dev.yml run events-service python manage.py test
$ docker-compose -f docker-compose-dev.yml run client npm run lint
$ docker-compose -f docker-compose-dev.yml run user-service py.test --black --pep8 --flakes -vv --mccabe --cov=project --cov-report=term-missing --junitxml=test-results/results.xml
$ docker-compose -f docker-compose-dev.yml run events-service py.test --black --pep8 --flakes -vv --mccabe --cov=project --cov-report=term-missing --junitxml=test-results/results.xml
$ docker-compose -f docker-compose-dev.yml run users-service python manage.py cov
docker-compose -f docker-compose-dev.yml run events-db sh
psql postgres://postgres:postgres@events-db:5432/events_dev
Integration tests used to evaluate all services behave correctly
$ npm install testcafe -g
$ export TEST_URL='http://localhost'
$ testcafe chrome e2e
Deployments to the staging and production environments require a PR to be opened against the staging/production branches; Upon successfully merging a PR into either branch; Travis CI will build, run, test, and deploy the changes to AWS ECS.
- React - Javascript client framework
- Flask - Python web framework
- Postgres - Relational Database Management System
- Docker - Build, run, and deploy services
- Swagger - Generate API documentation
- Nginx - high-performance HTTP server, reverse proxy
A list of contributors who participated in this project.
Kyle Harrison π» π |
Adam Smith π» |
Ewa G π» |
Michael Grundie π» |
DermotMcAteer π» |
kimmoylan π» |
Peter Stevenson π» |
---|---|---|---|---|---|---|
Alistair Brown π» |
gingerzoealex π» π¨ |
This project is licensed under the MIT License - see the LICENSE.md file for details
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.