Skip to content

shra1dhar/femo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Set up Postgres container

  1. Check available images docker images
  2. If not available then download the alpine version (since it is light) docker pull postgres:12-alpine
  3. To check running container use docker ps
  4. For running container, use: docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine

-p : -e for setting environment variables -d to run as detached (background)

Also note, password is not asked when we run postgres container locally

To get a interactive shell in the container, use: docker exec -it postgres12 psql -U root

Commands psql, select now(); to verify access.

To exit console, use: \q

For Docker logs

docker logs <container_name_or_id>

To check logs for container we created: docker logs postgres12

To tail the logs: docker logs postgres12 --tail or docker logs postgres12 --follow


For schema use: https://dbdiagram.io/home For managing DB use: TablePlus

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published