一个使用gorm,postgres,gin搭建的笔记项目的后端,前端项目:jianji-web
-
新建容器
docker run --name postgres-for-jianji -p 5434:5432 -e POSTGRES_PASSWORD=333333 -d postgres
-
docker exec
psql -U postgres
CREATE ROLE jianji WITH LOGIN PASSWORD '333333'; CREATE DATABASE jianji OWNER jianji; GRANT ALL PRIVILEGES ON DATABASE jianji TO jianji;
- 新建容器
docker run --name redis-for-jianji -d -p 6379:6379 redis