4 schema
This commit is contained in:
13
4/deploy.sh
Executable file
13
4/deploy.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -exu
|
||||
|
||||
SERVER=root@185.103.252.32
|
||||
PSQL="sudo -u postgres psql"
|
||||
DB=db2026
|
||||
|
||||
scp schema.sql data.sql "$SERVER:/tmp/$DB/"
|
||||
ssh $SERVER \
|
||||
"chmod -R 777 /tmp/$DB;" \
|
||||
"$PSQL -d $DB -e -q -f /tmp/$DB/schema.sql;" \
|
||||
"$PSQL -d $DB -e -q -f /tmp/$DB/data.sql;"
|
||||
Reference in New Issue
Block a user