Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

richyen/ismp

 
 

Repository files navigation

Django & React application

CircleCI

This is a set up so that we can easily create apps that use Django on the backend (and take advantage of the amazing admin UI) and React (set up with create-react-app) for the front end application.

Development

  1. Make your edits in backend/ or frontend/
  2. make dev
  3. There should now be two servers running:

Testing

  1. make test
  2. This will build testing images and run manage.py test ... against a list of test targets

Running Manually

  1. docker-compose pull
  2. docker-compose up
  3. There should now be two servers running:

Using a dev site

For some people (namely frontend team and people with older laptops), you may wish to use an external dev site for the backend. To do this, follow these steps:

  1. cd into ismp/frontend
  2. echo 'REACT_APP_API_HOST="http://###.###.###.###:####/'" > .env, where ###.###.###.###:#### are the host and port to the backend dev site
  3. docker-compose up frontend
  4. Open your browser to localhost:3000 to view your checkout of the frontend

Troubleshooting

If you run into any issues with missing packages while the frontend container is running, you may need to clear the node_modules volume and re-pull or re-deploy the environment:

  1. docker-compose down
  2. docker volume prune -f
  3. docker-compose pull richyen/ismp-frontend
  4. docker-compose up frontend

Using docker-compose run to issue one-off commands

If you want to run a one-off command, like installing dependencies, you can use the docker-compose run <service_name> <cmd>.

For example, to install a Javascript dependency and save that information to package.json we could run: docker-compose run --rm frontend npm install --save axios

If you want to be on a shell for one of the Docker services, you can do something like: docker-compose run --rm frontend bash

Contributing

  • We will work with a fork-PR model. Please fork this repo and make your local edits, then submit a PR to get the changes merged
  • Please try to write tests for your work. Be sure to run make test to confirm that your contributions are functional

About

Re-vamp of ISMP website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.2%
  • Python 26.6%
  • HTML 1.4%
  • Shell 0.3%
  • Makefile 0.2%
  • CSS 0.2%
  • Dockerfile 0.1%