Skip to content

zmfink/Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker

Step-by-Step for setting up Django with Docker:

  1. Download Docker at https://www.docker.com -create an account

  2. Clone this repository to your local machine. Create a folder called 'app' once done. Keep it empty.

  3. Run: docker-compose build

  4. Run: docker-compose run app sh -c "django-admin startproject first_project ." Run: docker-compose build

  5. add '0.0.0.0' to ALLOWED_HOSTS in settings.py

  6. cd into your 'app' folder and then run: docker-compose up

**** Not docker related ****

Finish setting up first application (order TBD)

  1. docker-compose run app sh -c "django-admin startapp first_app"

2)In views.py add a view called "index"

  1. Create a urls.py in first_app folder. Add a 'urlpatterns' list

  2. Update urls.py in first_project folder to link with urls.py in first_app folder

  3. Create a 'templates' folder adjacent to 'first_project' and 'first_app' folder

  4. Create and index.html page under 'first_app' folder to pair up with our views.py

  5. Create TEMPLATE_DIR in settings.py

About

Dockerfiles for each CodeUp Module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors