Python Web Application Deployment Tutorial - Using Docker & Docker Compose - Part 1



#Flask #Docker #DockerCompose #Python
Welcome to a new series about Flask and Docker combined! In this video, you will learn the best practices to deploy your Web application do production, using the best deployment tools like Docker and Docker Compose, and more!

First time using Docker? Consider watching my getting started 40-minute tutorial that will clarify a lot for you: https://www.youtube.com/watch?v=BZiwpsnLLYQ

👍 Subscribe for more Tutorials like this!
https://www.youtube.com/channel/UCU8d7rcShA7MGuDyYH1aWGg?sub_confirmation=1
🔥 Comment below on other topics you want to see tutorials next on my Channel.
———————————————–

My website:
http://www.jimshapedcoding.com​

🎥 My YouTube Gear 🎥
Camera (Canon EOS 250D) : https://amzn.to/314euVC
Microphone (Rode NT-Mini) : https://amzn.to/3bDqEer
Headphones (JBL LIVE 500BT) : https://amzn.to/3e73MDS
Tripod (Neewer Portable Tripod) : https://amzn.to/2OXleC6
Desklight(AUKEY Cordless Lamp): https://amzn.to/2QaYT4A
Keyboard ( Razer Blackwidow Green Switch ) : https://amzn.to/3bExDnu
Mouse ( Razer LanceHead ) : https://amzn.to/3if0JuV
Lights ( Neewer 2-Pack Dimmable ): https://amzn.to/3oFN1DP

Useful Links:
Docker Official Documentation – https://docs.docker.com/get-docker/
Chocolatey Installation: https://www.chocolatey.org/install (will help you to automate installation on your windows machine)
Docker Hub (All the official Images) – https://hub.docker.com/

GitHub Repository with the code of the project: (Scroll down to the 16th folder)
https://github.com/jimdevops19/FlaskSeries

Timeline:
The app we will deploy to production – 00:00 – 02:55
Dependencies of our app (requirements.txt) 02:56 – 05:28
Creating the Dockerfile and organizing configurations – 05:29 – 13:31
Building and running Flask container – 13:32 – 17:36
Configuring Database configurations – 17:37 – 26:39
Testing the application with DEBUG on&off – 26:40 – 31:25

source

16 thoughts on “Python Web Application Deployment Tutorial – Using Docker & Docker Compose – Part 1”
  1. I am getting the following error while building the docker image : => ERROR [5/6] RUN pip3 install -r requirements.txt 4.1s
    ——
    > [5/6] RUN pip3 install -r requirements.txt:
    #10 3.464 Collecting flask
    #10 3.581 Downloading Flask-2.1.2-py3-none-any.whl (95 kB)
    #10 3.642 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 KB 2.3 MB/s eta 0:00:00
    #10 3.714 ERROR: Could not find a version that satisfies the requirement flask-sqlalachemy (from versions: none)
    #10 3.716 ERROR: No matching distribution found for flask-sqlalachemy
    #10 3.939 WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
    #10 3.939 You should consider upgrading via the '/usr/local/bin/python -m pip install –upgrade pip' command.

  2. thanks for the awesome explanation, for the last part of the video, I try to enter the right credentials admin/admin, but also the connection was failed .can you explain why, please

  3. I'm not able to run on localhost using docker compose. How to do ? here's my yaml file

    version: '3.3' # version of compose format

    services:

    landing-service:

    build: ./landing # path is relative to docker-compose.yml location

    hostname: landing-service

    ports:

    – "5001:5000" # host:container

    networks:

    sample:

    aliases:

    – landing-service

    # Add more services below

    networks:

    sample:

  4. This is the "best practices" python docker video I've dreamed about. Good work man, the amount/quality of content you have up is truly impressive.

  5. just came from the flask tutorial on the freecodecamp…..awesome work ..hope to see more videos from you

  6. This is a great tutorial. Is there any reason, inside the Dockerfile, you copy requirements.txt into /code/ directory in one step and then copy the remaining files in another step? Why not copy all at once?

Leave a Reply

Your email address will not be published.

Captcha loading...