Requirements:
- Docker CE ( Could be hosted on windows, vmware or virtualbox | Debian 9 )
- Python 3.5.3
- Django 2.2
- Please see .env file for database configuration
- No need to import dummy database it wll be handled by
docker-compose
- Email setup is for local only and not for production please see console logs for email confirmations.
-
- If you bring up your docker in background please use
docker-compose logs
to peek on console
- If you bring up your docker in background please use
- Install docker from this tutorial https://docs.docker.com/install/
- Extract the files on your workspace -
/<path_to_workspace>/dockerize_capsl_bb
- Go to your project directory -
/<path_to_workspace>/dockerize_capsl_bb
- Build images -
docker-compose build
(This may take a while for 1st time, go grab your coffee :) ) - Start services -
docker-compose up
- Browse your applciation on -
localhost
- Always run mmigration for new tables
docker exec -it dockerize_capsl_bb_web_1 /usr/local/bin/python manage.py migrate
- Test scripts are available,
docker exec -it dockerize_capsl_bb_web_1 /usr/local/bin/python manage.py test
- Go to https://documenter.getpostman.com/view/5184773/SzRxVVSF?version=latest and Click "Run in postman"
- If your postman opens choose "Django Board | Local" as environment to your top right corner
- If the 2 above does not work, proceed below to the manual
- Download and install postman here https://www.postman.com/downloads/
- If you wanted to sign-in you can use your google account but this is optional
- Open you postman then click "Import" > "Import From Link"
- Paste this URL https://www.postman.com/collections/86f7e40f157e8aff956c
- Click "Import"
- On your left side panel you should see the "DJango Board" in Collections tab
- Finally add environment variables
- Click the gear icon on top right corner
- Click "Add" button
- Type "Django Board | Local" as the environment name
- Variables are
VARIABLE | INITIAL VALUE | CURRENT VALUE |
host | localhost | localhost |
token_auth | (leave blank) | (leave blank) |
- User - Password
-
- admin - admin (superuser)
-
- test1 - abcd1234
-
- zjordan - abcd1234
-
- test2 - abcd1234
-
- test3 - abcd1234
-
- reyeskevin - abcd1234
- If nginx is running then stop it because docker web container will listen to port 80
- If postgresql is running then stop it because docker postgresql container will listen to port 5432
- If using VirtualBox from windows you should mount you files properly for permission correction -
mount -t vboxsf -o rw,uid=1000,gid=1000 <share_name> <mount_path>
- Local host url -
localhost