Skip to content

A Bulletin board application made from Django and containerized for docker

Notifications You must be signed in to change notification settings

jslmariano/dockerize_django_bb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DJango Bulletin Board Development With Docker Compose

Requirements:

  • Docker CE ( Could be hosted on windows, vmware or virtualbox | Debian 9 )
  • Python 3.5.3
  • Django 2.2

Notes

  • 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

Local Dev Instructions

  1. Install docker from this tutorial https://docs.docker.com/install/
  2. Extract the files on your workspace - /<path_to_workspace>/dockerize_capsl_bb
  3. Go to your project directory - /<path_to_workspace>/dockerize_capsl_bb
  4. Build images - docker-compose build (This may take a while for 1st time, go grab your coffee :) )
  5. Start services - docker-compose up
  6. Browse your applciation on - localhost
  7. Always run mmigration for new tables docker exec -it dockerize_capsl_bb_web_1 /usr/local/bin/python manage.py migrate
  8. Test scripts are available, docker exec -it dockerize_capsl_bb_web_1 /usr/local/bin/python manage.py test

Restful API

  1. Go to https://documenter.getpostman.com/view/5184773/SzRxVVSF?version=latest and Click "Run in postman"
  2. If your postman opens choose "Django Board | Local" as environment to your top right corner
  3. If the 2 above does not work, proceed below to the manual
  4. Download and install postman here https://www.postman.com/downloads/
  5. If you wanted to sign-in you can use your google account but this is optional
  6. Open you postman then click "Import" > "Import From Link"
  7. Paste this URL https://www.postman.com/collections/86f7e40f157e8aff956c
  8. Click "Import"
  9. On your left side panel you should see the "DJango Board" in Collections tab
  10. Finally add environment variables
  11. Click the gear icon on top right corner
  12. Click "Add" button
  13. Type "Django Board | Local" as the environment name
  14. Variables are
VARIABLE    | INITIAL VALUE    | CURRENT VALUE    |
host        | localhost        | localhost        |
token_auth  | (leave blank)    | (leave blank)    |

Users

  • User - Password
    • admin - admin (superuser)
    • test1 - abcd1234
    • zjordan - abcd1234
    • test2 - abcd1234
    • test3 - abcd1234
    • reyeskevin - abcd1234

TROUBLESHOOTING

  • 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

About

A Bulletin board application made from Django and containerized for docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published