Skip to content

davi-marangoni/prompt-diary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

prompt-diary

Description

Just a simple prompt aplication to test some functions of python and psychopg2

Technologies Used

  • Python 3.10
  • Psychopg2 2.9.6
  • PostgreSQL 15.3
  • Docker 24.0.2
  • Docker Compose 2.18.1

How to run

  1. Clone this repository
$ git clone [email protected]:davi-marangoni/prompt-diary.git
  1. Install the psycopg2 library
$ pip install psycopg2
  1. Install Docker and Docker Compose
 $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
 $ sudo apt-get install docker-compose-plugin
  1. Create the docker.compose.yml file and run
version: '3'
services:
  postgres:
    image: postgres:latest
    restart: always
    ports:
      - '5432:5432'
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=postgres
    volumes:
      - ./data:/var/lib/postgresql/data
$ docker compose up -d
  1. Create the database and table's
CREATE DATABASE diary;

CREATE TABLE public.events (
	event_id serial4 NOT NULL,
	event_description text NULL,
	event_date timestamp NULL,
	CONSTRAINT events_pkey PRIMARY KEY (event_id)
);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages