全栈开发项目编程系列讲解

好像没那么简单

MacBook-Air:BulletJournal $ pg_ctl -D /usr/local/var/postgres stop
pg_ctl: PID file "/usr/local/var/postgres/postmaster.pid" does not exist
Is server running?

brew services list 里面postgresql是stopped状态

MacBook-Air:BulletJournal $ brew services list
Name           Status  User   Plist
mariadb        stopped        
postgresql     stopped        
unbound        stopped        

MacBook-Air:BulletJournal $ brew services stop postgresql
Error: Service `postgresql` is not started.

然而端口还是占用

MacBook-Air:BulletJournal $ sudo lsof -i :5432
COMMAND    PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
postgres 12817 postgres    4u  IPv6 0xd93867137910b6b5      0t0  TCP *:postgresql (LISTEN)
postgres 12817 postgres    5u  IPv4 0xd938671373cb33f5      0t0  TCP *:postgresql (LISTEN)

我再研究一下

重启一下 :joy:

嗯这次work了

MacBook-Air:BulletJournal $ sudo kill 66
MacBook-Air:BulletJournal $ ps -ef | grep postgres
  501 24092 15210   0 11:31PM ttys000    0:00.00 grep postgres
MacBook-Air:BulletJournal $ sudo lsof -i :5432
1 Like

参考 系统设计系列讲解 - Cache

1 Like

想问下目前项目启动(. start.sh)后运行PgAdmin,应该能看到哪几个table?
Screen Shot 2020-02-09 at 3.41.25 PM

需要pull最新的代码然后build一下新的image, 跑 DOCKER_BUILDKIT=1 docker build -t mwangxx/bulletjournal-backend .

2 Likes

另外可以改下 application.properties

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = create-drop
1 Like
1 Like

目前代码已经部署在 https://bulletjournal.us/