Project Setup
Prerequisite
Install docker and docker-compose in your OS
please refere the Link
Up/Running with service
- Go to project root directory
- To start project: Run docker-compose up -d - now visit on http://127.0.0.1:8000
- To stop your project: Run docker-compose down
- Note: Make sure port 8000 and 5432 is open in your machine
API Endpoint
- 127.0.0.1:8000/user => GET
- 127.0.0.1:8000/user/ => POST
- 127.0.0.1:8000/user/user_id => PUT
- 127.0.0.1:8000/user/user_id => DELETE
API Specification
DOC
Troubleshoot
In case of any issue run command with sudo or take reference of log
To view container log
Run: docker logs ##container-name##
Or
RUN: docker-compose down and then docker-compose up
now see the log in terminal
Building fixture from existing DB
- docker-compose run xeo_web ./manage.py dumpdata app_name.model_name --indent 4 > service/fixture/users.json
Loading fixture in db
- docker-compose run xeo_web ./manage.py loaddata service/fixtures/users.json --app app.model_name
docker-compose run xeo_web ./manage.py test
prospector --uses django -o json service > temp/.prospector_history/a
Anuj Kumar Singh
anuj.dev@hotmail.com
Happy to help you !!