Files
db2026/4/deploy.sh
2026-03-10 14:35:04 +03:00

14 lines
271 B
Bash
Executable File

#!/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;"