cpath=$(pwd)
cd $git_project_path
# show latest commited files, name-only and oneline
git show --name-only --oneline HEAD > $cpath/head.log
cd $cpath
cpath=$(pwd)
cd $git_project_path
# show latest commited files, name-only and oneline
git show --name-only --oneline HEAD > $cpath/head.log
cd $cpath
Postgres running in Docker container
--------------------------------------------
#shell
olddb=postgres1340
newdb=postgres-new-14.11
#backup old db data
docker exec -t $olddb pg_dumpall -c -U postgres > ./backup/all_db_backup.sql
#stop old db
docker stop $olddb
#restore data to newdb
cat ./backup/all_db_backup.sql | docker exec -i $newdb psql -U postgres | tee restore.log
Can't connect to new PostgresDB after verup
------------------------------------------------------
check /var/lib/postgresql/data/pg_hba.conf ,add :
# Allow all IPv4 connections
host all all 0.0.0.0/0 md5
Prerequisites:
1. All Installed in an AWS EC2 docker host.
2. install the next tools
2.1. docker, docker-comose
2.2. nginx-docker-compose.yaml