Hearted Youtube comments on Developer Timeline (@developertimeline) channel.
-
2100
-
1400
-
1400
-
1000
-
780
-
657
-
642
-
528
-
480
-
474
-
197
-
170
-
147
-
147
-
146
-
141
-
138
-
126
-
118
-
117
-
114
-
113
-
107
-
106
-
74
-
73
-
73
-
68
-
68
-
64
-
63
-
62
-
62
-
59
-
58
-
56
-
55
-
52
-
50
-
43
-
42
-
41
-
37
-
36
-
34
-
31
-
30
-
30
-
29
-
28
-
27
-
27
-
27
-
25
-
25
-
24
-
24
-
24
-
23
-
23
-
23
-
22
-
21
-
19
-
19
-
19
-
18
-
18
-
18
-
17
-
17
-
16
-
15
-
15
-
15
-
14
-
14
-
14
-
14
-
14
-
14
-
13
-
13
-
13
-
13
-
12
-
12
-
12
-
12
-
11
-
11
-
11
-
10
-
10
-
10
-
9
-
8
-
8
-
8
-
8
-
8
-
8
-
7
-
7
-
7
-
7
-
7
-
7
-
7
-
7
-
7
-
7
-
7
-
6
-
6
-
6
-
6
-
6
-
6
-
6
-
6
-
6
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
2
-
2
-
2
-
2
-
2
-
Hey, thanks for this video!
I am a total Docker newbie but this helped me understand what was going on while I made something useful. I finally got my first Docker container running! Totally agree with your statement at the end there about not necessarily explaining everything; I also prefer videos to get straight to the point. People should also be nice when they ask questions to you rather than saying "Why didn't you explain this??" :)
Everything worked for my project except the Alpine stuff (weird issue compiling the Python cryptography package that I couldn't figure out), so I did "FROM python:3.7" rather than "FROM python:3.7-alpine" and removed all Alpine ("apk") commands. For other newbies out there, the dockerhub Python page recommends not doing the Alpine version unless you're experienced, because the Alpine image is limited and you might have to manually install extra stuff to get your project to work.
For reference, I built an app using Django, Postgres, and Redis, using the channels_redis module for a live chat system. No need to install celery for me, at least not yet, so I just commented the celery configs out, and used the following Redis settings:
In docker-compose.yml:
redis:
image: redis
ports:
- "6379:6379"
In Django settings . py file:
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [('redis', 6379)],
'symmetric_encryption_keys': [SECRET_KEY],
}
,
},
}
Also, here's my cheatsheet of commands after this video if this helps anyone out...
To build the image:
> docker-compose build
Doing some example Django commands within the containerized app:
> docker-compose run app sh -c "python3 manage.py createsuperuser"
> docker-compose run app sh -c "django-admin whatever_django_admin_command_you_want and_args"
To run the app!
> docker-compose up
Again, thanks for the help!
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1