이제 postgres 에 친숙해져보자. (feat. cli )
nestJS 공부를 하면서, 디비는 postgres 를 사용하고 있다. https://blog.1day1.org/720
coolify - Github App 을 사용해서, git push 하면 자동 배포하자
지난글에 nestJS 앱을 dockerfile 을 사용해서 배포하는 방법을 정리했다. https://blog.1day1.org/719 coolify 를 사용해서 nestJS + postgres 앱을 배포해보자coolify 를 써보다 보니 재밌다.처음이라 좀 헤맨 부분
blog.1day1.org
한동안은 postgres 를 사용할 듯 하다.
관련 필요한 명령등을 정리해본다.
일단 설치부터.
# https://www.postgresql.org/download/macosx/
PostgreSQL: macOS packages
macOS packages You can get macOS PostgreSQL packages from several sources. Interactive installer by EDB Download the installer certified by EDB for all supported PostgreSQL versions. Note! This installer is hosted by EDB and not on the PostgreSQL community
www.postgresql.org
해당 부분에서 다운로드 해서 설치 - 설치는 무난하니 패스.
(혹시 기존 brew install postgresql 이 있었는데, 혼동될까봐 brew 패키지는 삭제했다.)
# .bash_profile / .zshrc 명령 path 등록.
# postgresql 16
export PATH="/Library/PostgreSQL/16/bin:$PATH"
# 맥OS 터미널에서 관리하는 주요 명령들
디비 서버 상태 보기
# sudo -u postgres pg_ctl -D /Library/PostgreSQL/16/data/ status
pg_ctl: server is running (PID: 83175)
/Library/PostgreSQL/16/bin/postgres "-D" "/Library/PostgreSQL/16/data"
디비 서버 중지 / 실행
$ sudo -u postgres pg_ctl -D /Library/PostgreSQL/16/data/ stop
waiting for server to shut down.... done
server stopped
$ sudo -u postgres pg_ctl -D /Library/PostgreSQL/16/data/ start
waiting for server to start....
2024-09-08 23:43:17.987 KST [83267] LOG: redirecting log output to logging collector process
2024-09-08 23:43:17.987 KST [83267] HINT: Future log output will appear in directory "log".
done
server started
그외 주요 명령들
데이터 입력 / 테이블 관리 등등.
... 계속 정리...
'알아둘일' 카테고리의 다른 글
coolify 로 원격 서버를 활용해보자 (multi server) (0) | 2024.09.21 |
---|---|
네이버 스팸은 조심하자. 어떻게 확인하지? (1) | 2024.09.19 |
coolify - Github App 을 사용해서, git push 하면 자동 배포하자 (0) | 2024.09.08 |
coolify 를 사용해서 nestJS + postgres 앱을 배포해보자 (0) | 2024.09.08 |
n8n 음 뭔가 쉽진 않군. (4) | 2024.09.07 |
WRITTEN BY
- 1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.