]> Git — Sourcephile - gargantext.git/blob - devops/docker-postgres
[REFACTO] ngrams unsupervised.
[gargantext.git] / devops / docker-postgres
1 set -eu
2 docker stop dbgarg || :
3 docker rm --volumes dbgarg || :
4 export PGPASSWORD="$(grep DB_PASS gargantext.ini | \awk '{print $3}')"
5 docker run --name dbgarg -e POSTGRES_USER=gargantua -e POSTGRES_DB=gargandbV5 -e POSTGRES_PASSWORD=${PGPASSWORD} -d postgres
6 sleep 3
7 docker run -e PGPASSWORD -i --rm --link dbgarg:postgres postgres psql -h postgres -U gargantua -d gargandbV5 < src/Gargantext/Database/Schema/schema.sql
8 #docker run -e PGPASSWORD -i --rm --link dbgarg:postgres postgres psql -h postgres -U gargantua -d gargandbV5 < gargantext.dump
9 #docker run -e PGPASSWORD -i --rm --link dbgarg:postgres postgres dropdb -h postgres -U gargantua gargandbV5