docker-compose创建pg用户和库


deploy@mw3:/mwdata/compose$ docker-compose exec pg psql -U postgres
psql (12.3 (Debian 12.3-1.pgdg100+1))
Type "help" for help.

postgres=# create user gogs with password '123456';
CREATE ROLE
postgres=# create database gogs owner gogs;
CREATE DATABASE
postgres=# grant all privileges on database gogs to gogs;
GRANT
postgres=# exit

阅读量: 450
发布于:
修改于: