Chazzvdh / TaskVault

Simplify task management with a intuitive application. Stay organized, collaborate effectively, and boost productivity with ease.
0 stars 0 forks source link

Docker-Compose Setup for Database #7

Open Chazzvdh opened 6 months ago

Chazzvdh commented 6 months ago

Utilize Docker Compose to orchestrate the setup of a PostgreSQL database in a Docker container, ensuring ease of deployment and management.

Requirements

Functional requirements

Non-functional requirements

docker-compose.yml Example

version: '3.8'

services:
  db:
    image: postgres:latest
    restart: always
    environment:
      POSTGRES_DB: your_database_name
      POSTGRES_USER: your_username
      POSTGRES_PASSWORD: your_password
    ports:
      - "5432:5432"
    volumes:
      - db_data:/var/lib/postgresql/data

volumes:
  db_data:

Usage Instructions

  1. Save the docker-compose.yml file in your project directory.
  2. Open a terminal and navigate to your project directory.
  3. Run the following command to start the PostgreSQL database:
    docker-compose up -d
  4. To stop the database, use:
    docker-compose down

Additional Notes