Skip to content

Commit 074a0b3

Browse files
authored
Ensure 'api' user is created in docker image (#3)
- 'psql -U postgres --no-align --tuples-only -c "SELECT 1 FROM pg_roles WHERE rolname='api'" | grep -q 1 || psql -U postgres -c 'create role api login PASSWORD NULL' postgres' => 'psql -U postgres -c 'create role api login PASSWORD NULL' postgres > /dev/null'
1 parent 62d9d98 commit 074a0b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

install.sh

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

33
psql -U postgres -c 'create database dependencydb' postgres
4-
psql -U postgres --no-align --tuples-only -c "SELECT 1 FROM pg_roles WHERE rolname='api'" | grep -q 1 || psql -U postgres -c 'create role api login PASSWORD NULL' postgres
4+
psql -U postgres -c 'create role api login PASSWORD NULL' postgres > /dev/null
55
psql -U postgres -c 'GRANT ALL ON DATABASE dependencydb TO api' postgres
66
sem-apply --url postgresql://api@localhost/dependencydb

0 commit comments

Comments
 (0)