Notes taken by Abd @ITNA Digital
🔗 Link to the video
Table of Contents
Previously we have run a -
Instead of having all this messy configuration we can build a
YAML file that describes all the configuration and connects the two databases with on network.
Docker Compose allows putting configuration of multiple containers in to one file. Instead of writing all that messy commands we will just create everything in one fell sweep with Docker Compose. Docker Compose is a convenient way to run multiple related services with just one config file.
docker-compose if you have installed docker desktop. If not follow the instructions on how to install it.
Create the file "docker-compose.yaml".
services: pgdatabase: image: postgres:13 environment: - POSTGRES_USER=root - POSTGRES_PASSWORD=root - POSTGRES_DB=ny_taxi volumes: - "./ny_taxi_postgres_data:/var/lib/postgresql/data:rw" ports: - "5432:5432" pgadmin: image: dpage/pgadmin4 environment: - PGADMIN_DEFAULT_EMAILfirstname.lastname@example.org - PGADMIN_DEFAULT_PASSWORD=root ports: - "8080:80"