Skip to content

Example reimplementation of Concept Library to demonstrate how a refactor could help us

Notifications You must be signed in to change notification settings

JackScanlon/CLDevSuite

Repository files navigation

Summary

Example reimplementation of ConceptLibrary to demonstrate how a refactor could help us improve performance

Boilerplate ref @ https://github.com/JackScanlon/DjangoBoilerplateExample

Superuser

Note: The default params for this development account can be changed in ./env/app.compose.env, or you can make changes to the tool in ./app/tools/create_superuser.py

When Debug=1 the app will create a superuser with the username of admin ([email protected]) and a password of admin.

To develop

  1. Create a virtual environment:
python -m venv venv
  1. Install requirements
pip install -r requirements.txt
  1. References to the assoc. packages will now be available in your editor and/or IDE.

To run

Note: ElasticSearch may complain that you do not have enough memory on your VM.

If you're using Windows as your local machine, you can run the following command to solve this issue:

wsl -d docker-desktop sysctl -w vm.max_map_count=262144

Production

  1. Change the env variables in ./env, esp. ensuring that DEBUG=0
  2. In the root directory of the repo, run the following:
docker-compose -f docker-compose.prod.yml build
  1. Now run:
docker-compose -f docker-compose.prod.yml up
  1. Navigate to http://localhost:8000

Development

  1. Change the env variables in ./env, esp. ensuring that DEBUG=1
  2. In the root directory of the repo, run the following:
docker-compose -f docker-compose.dev.yml build
  1. Now run:
docker-compose -f docker-compose.dev.yml up
  1. Navigate to http://localhost:8008

To remove docker assoc. volumes/containers/images:

Removing dev container

docker-compose -f docker-compose.dev.yml down

Removing prod container

docker-compose -f docker-compose.prod.yml down

Remove dangling images

Note: The following will remove all dangling images, incl. those not assoc. with the boilerplate (be careful!)

docker rmi -f $(docker images -aq)

Remove dangling volumes

Note: The following will remove all dangling images, incl. those not assoc. with the boilerplate (be careful!)

docker volume rm $(docker volume ls -qf dangling=true)

About

Example reimplementation of Concept Library to demonstrate how a refactor could help us

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published