This is Docker Compose development platform. Below are instructions for creating local development workflow of Python back-end, React front-end and Jupyter Notebooks.
- Docker
- Docker-Compose
- Make
- Sibling repositories as sibling directories:
- dms-backend
- dms-frontend
- dms-jupyter
git clone --recurse-submodules git@github.com:arcticportal/dms-platform.git
- Open a terminal and go to the directory where you git-pulled required repositories.
- Ensure the ports 80, 3000 5432, 8000 and 8888 are not in use. To change used ports, edit
docker-compose.yml. - Make your own
.envfile from.env.examplefile. - Run
make buildupand wait until all containers are successfully built.
- When you are done, stop the containers by going to the first terminal window and pressing Ctrl-C and
make downcommand to remove containers or make down -v to also remove all related volumes. - Next time, to start the containers, just run
make up. This uses the images built during the first run. - File with more commands is located in
dms-platform/Makefile.
- Navigate to dms-platform and run
make jupyteror inside python container runpython3 manage.py shell_plus --notebook. - Copy login key from terminal output.
- Go to
localhost:8888/and add login key to URL.
- Open a terminal and go to the platform-dev directory.
- If
../platform-app/node_modulesor.localdirectories are missing, then runmake moddump. This populates the module directories for your IDE tooling to inspect. - Edit the code in
../dms-frontendand../dms-backenddirectories. Changes are visible immediately on page, no need to reload (check URLs below). - To check if there is change in database tables from Django run
make makemigrationsormake migrateto apply changes. - Run
make collectstaticto collect static files from back-end admin panels. - To save the database, run
make db-dump.
- Nginx is running on `localhost'
- React front-end is running on
localhost:3000.- Hot-reloading: This requires bypassing Nginx server by using
localhost:3000.
- Hot-reloading: This requires bypassing Nginx server by using
- Django admin panel running on
localhost/{root defined in env file}. - Wagtail CMS is running on
localhost/{root defined in env file}. - Strawberry GraphQL playground is on
localhost/graphiql. More info ondms-platform's Readme file. - Jupyter Notebook is running on
localhost:8888, instructions to enable server are above
------TBD