docker compose up

Docker Compose is a tool used to define and run multi-container Docker applications using a simple YAML file docker-compose.yml It lets you start, stop, and manage multiple containers (like app + database + cache) with a single command (docker compose up), making development and deployment easier. version: "3.8" services: flask-app: build: . #path to dockerfile #to use existing image use image tag like in db and give path to image. ports: - "5000:5000" environment: - MYSQL_HOST=db - MYSQL_USER=root - MYSQL_PASSWORD=rootpassword - MYSQL_DB=flaskdb depends_on: - db networks: - app-network db: image: mysql:8.0 restart: always environment: - MYSQL_ROOT_PASSWORD=rootpassword - MYSQL_DATABASE=flaskdb volumes: - mysql-data:/var/lib/mysql networks: - app-network volumes: mysql-data: networks: app-network: driver: bridge 1. Healthchecks A way to tell its status beyond just ‘is it running’ ...

June 15, 2025

docker

DOCKER 1. Virtualization vs Containerization Virtualization is basically what happens in VMs using hypervisor. Every time you want to put an OS it takes resources from the host’s computer (Like memory, storage and CPU cores) to install and run on those resources. Whereas Containerization is a lightweight alternative to virtualization. It allows multiple application to run isolated by using containers and sharing the same host’s OS and kernel. Containers package the application along with its dependencies, libraries and runtime. ...

June 14, 2025