• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How To Use Docker To Make Local Development A Breeze

Docker is a very powerful tool for developing applications that run in the cloud. If you want to get the most out of it, you need to make sure that the way you're running your code locally matches as closely as possible with how it runs in the cloud.

Today I'm going to show you how to do this, using a simple API server in Python as an example.

Video: https://youtu.be/zkMRWDQV4Tg.

Usage

As a first step, install Docker (see: https://www.docker.com) and install the requirements:

pip install -r requirements.txt

This is how you run the code locally (without Docker):

uvicorn main:app --host 0.0.0.0 --port 8080 --reload

Build and run the Docker image locally, as follows:

docker build -t channel-api .
docker run -d -p 8080:80 channel-api

In order to run the example server with docker compose, use this:

docker-compose up --build

If you use docker compose and you make a minor change in the file, you can now see how everything is updated and the server is restarted automatically.

More Repositories

1

betterpython

Code examples for my Write Better Python Code series on YouTube.
Python
1,159
star
2

examples

All the code examples I use in my videos
HTML
418
star
3

2022-dash

Python
104
star
4

2021-data-science-refactor

Python
101
star
5

2023-fastapi

Python
101
star
6

2021-code-smells

Code for the Python code smells video on the ArjanCodes channel.
Python
68
star
7

2021-composition-vs-inheritance

Python
63
star
8

2021-plugin-architecture

Python
57
star
9

2021-factory-pattern

Python
57
star
10

2022-test-existing-code

Python
53
star
11

2022-gui

Python
47
star
12

2022-asyncio

Python
46
star
13

2021-pydantic

Python
45
star
14

2023-package

Python
41
star
15

2021-asyncio

Python
40
star
16

2023-decorator

Python
38
star
17

2021-protocol-vs-abc

Protocols vs ABC - which one should you use when?
Python
38
star
18

2021-coderoast-towerdefense

Python
30
star
19

2021-config

Python
28
star
20

2023-logging

Python
26
star
21

2022-funcguide

Python
24
star
22

2021-pythonic-strategy

Python
23
star
23

coderoast-yahtzee

Python
22
star
24

2021-coderoast-scrape

Python
22
star
25

2022-functions

Python
22
star
26

2022-chessroast

Python
20
star
27

2022-context-managers

Python
18
star
28

2021-pythonic-factory

Python
17
star
29

2023-grasp

Python
16
star
30

2021-dependency-injection-inversion

Python
15
star
31

2022-cicd

Python
15
star
32

2022-rest-graphql

Companion code to the GraphQL vs REST video
Python
15
star
33

2023-orm

Python
13
star
34

2023-pandera

Python
13
star
35

2021-strategy-parameters

This repository contains the code for the Strategy With Parameters video on the ArjanCodes YouTube channel.
Python
13
star
36

glassmorphism

Example of how to achieve the Glassmorphism effect in React.
TypeScript
12
star
37

2022-facade

Python
11
star
38

discord-bot

Python
11
star
39

2022-bridge

Example code belonging to the Bridge pattern video
Python
11
star
40

2021-more-code-smells

This repository contains the code for the More code smells video on the ArjanCodes channel.
Python
11
star
41

2022-pulumi

Python
11
star
42

2022-hypothesis

Python
10
star
43

2023-attrs

Python
10
star
44

2022-coupling

Python
10
star
45

2022-coderoast-rpsls

Python
9
star
46

2022-func-ideas

Python
9
star
47

2021-dataclasses

Python
9
star
48

2022-adapter

Python
8
star
49

2021-command-transactions

Python
8
star
50

2023-pandas

Python
8
star
51

2021-tdd

Python
8
star
52

2023-mbtesting

Python
7
star
53

2021-structural-pattern-matching

Python
7
star
54

2022-slots

Python
6
star
55

2022-pathlib

Python
6
star
56

2023-itertools

Python
6
star
57

2022-shorts-1

Python
6
star
58

2022-abtest

Python
6
star
59

2021-command-undo-redo

Python
6
star
60

2022-encapsulation

Python
4
star
61

2022-coderoast-battleship

Python
4
star
62

2021-even-more-code-smells

Python
4
star
63

2022-datetime

Python
4
star
64

2021-ux-design-tips

TypeScript
2
star
65

2022-python311

Python
2
star