]> Git — Sourcephile - gargantext.git/blob - devops/postgres/create
[john snow nlp] add image to docker-compose file
[gargantext.git] / devops / postgres / create
1 #!/bin/bash
2
3 # sudo su postgres
4
5 # postgresql://$USER:$PW@localhost/$DB
6
7 PW="C8kdcUrAQy66U"
8 DB="gargandb1"
9 USER="gargantua"
10
11 #psql -c "CREATE USER \"${USER}\""
12 #psql -c "ALTER USER \"${USER}\" with PASSWORD '${PW}'"
13
14 psql -c "DROP DATABASE IF EXISTS \"${DB}\""
15 createdb "${DB}"
16 #psql "${DB}" < schema.sql
17
18 ../../bin/psql ../../gargantext.ini < gargandb.dump
19
20 psql -c "ALTER DATABASE \"${DB}\" OWNER to \"${USER}\""
21
22
23
24
25