* Linux ** Check Version centOS lsb_release -a [CentOS] cat /etc/os-release [Ubuntu] ** screen/docker *** TERM=xterm-256color ** gzip gzip 2020-06-09.shop.sql gunzip 2020-06-09.shop.sql.gz gzip -c 2020-06-06.shop.sql > sql.gz #Keep original file * Docker ** Rename Container docker rename my_container my_new_container ** Rename Image for pushing docker image tag d583c3ac45fd myname/server:latest ** Push https://hub.docker.com/?overlay=onboarding&step=ship *** Server docker run -p 5000:5000 registry *** Client (Pusher) docker image tag 696d45464111 localhost:5000/celwk/can-lisp docker push localhost:5000/celwk/can-lisp localhost maybe celwk.com ** Postgres docker network create shoapp docker run -d --net=shoapp --name podb -e POSTGRES_PASSWORD=qqqq -e POSTGRES_HOST_AUTH_METHOD=trust -p 8989:5432 postgres PGDATABASE="postgres" psql -U postgres -h 0.0.0.0 -p 8989 apt-get install postgresql-client **On Another Container** docker network inspect shoapp => "IPv4Address": "172.18.0.2/16" psql -h 172.18.0.2 -U postgres shop3 psql -h 0.0.0.0 -p 8989 (On the Container Host--Mac) ** Go back to host system without exiting: *** *Ctrl+P+Q* *** docker attach containerId [to go back] * Posrgres ** Check where is the data file show data_directory; ** Show runtime params show all; ** Show Config File SHOW config_file; SELECT name, setting FROM pg_settings WHERE category = 'File Locations'; *** Update pg_hba.conf SELECT pg_reload_conf(); ** Login Remote ALTER USER postgres with password '1****2qqqq'; # In host export PGDATABASE=shop3 export PGUSER=postgres export PGHOST=celwk.com export PGPASSWORD=1****2qqqq ** Update database on server psql -h celwk.com drop database shop3; \i ~/Desktop/shop3.sql; ** Update remote address connection availability select name, setting from pg_settings where category = 'File Locations'; https://support.plesk.com/hc/en-us/articles/115003321434-How-to-enable-remote-access-to-PostgreSQL-server-on-a-Plesk-server- postgresql.conf: listen_addresses = '*' https://www.postgresql.org/docs/current/auth-pg-hba-conf.html pg_hba.conf: host all all 0.0.0.0/0 md5 https://webhostinggeeks.com/howto/how-to-start-stop-restart-postgresql-database-server-on-linux-centos-6-2-server/ Require Restart: /etc/rc.d/init.d/postgresql status /etc/rc.d/init.d/postgresql restart * VSCode ** Format Document shift + alt + F ** Toggle Side Bar cmd + b ** Toggle Tab Bar cmd + ctrl + w ** Fold All cmd + k + 0 ** Unfold All cmd + k + j ** See All Key Dinding cmd + k + s ** Toggle Terminal ctrl + ` * JavaScript ** RegExp /abc.ef/s.test('abc\nef') => true, 's' means . for all including \n * Chrome thisisunsafe