Django - From Code To Production

Описание к видео Django - From Code To Production

Receive $200 in free credits with DigitalOcean: https://m.do.co/c/6a9bd97a0991

In this video I show how to quickly bootstrap a Django project for production.

Repo from video: https://github.com/mesmerlord/djangoc...

Use cookiecutter: https://github.com/cookiecutter/cooki...

1:03 Install cookiecutter-django + configuration
5:28 Explaning docker and cookiecutter while packages are downloading
15:05 Start a django app inside docker-compose
15:50 Creating models.py file
16:57 makemigrations inside docker-compose
17:21 Adding your newly created app to installed_apps
17:52 Migrate your changes with docker-compose command
18:08 Add admin panel for created models
19:54 Creating new superuser for admin login and logging in
20:42 Manually adding some data to database
21:51 Creating API Viewset
22:15 Creating Serializers
24:27 Adding Viewset to api_router
27:04 Creating a github repository
27:24 Git commands to initiate and push changes to newly created repo
28:11 Getting server IP from provider of choice

***** PRODUCTION STEPS *********

29:00 Connecting via SSH to your server
29:22 Cloning project on server
30:00 Editing DNS entries on domain provider
31:45 Copying over production env to server
32:55 Installing docker and docker-compose
37:45 Starting project with docker-compose
39:32 Migrating and creating superuser
41:39 Fixing issue, replacing example.com with valid email
42:13 Pulling repo and restarting with docker-compose
43:43 Changing permissions for API docs view
46:28 Manually adding some objects to database using Swagger frontend interface
48:48 Development workflow, code changes + makemigrations + push to github
50:51 Pull changes + rebuild containers + re-up django container in detached mode + migrate
52:30 Check if the changes are effective in the browser
52:35 PROFIT

Комментарии

Информация по комментариям в разработке