forked from Castronova/hydroshare2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit-migrations
More file actions
26 lines (20 loc) · 817 Bytes
/
init-migrations
File metadata and controls
26 lines (20 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
if [[ $PWD == *hydroshare ]]
then
docker run -t -i -name hydroshare-migrations \
-link hydroshare-redis:redis \
-link hydroshare-postgis:postgis \
-p 0.0.0.0:80:80 -expose 22 \
-v $PWD:/home/docker/hydroshare
dev.hydroshare.org:5999/hydroshare /usr/bin/python /home/docker/hydroshare/manage.py schemamigration --init $1
docker rm hydroshare-migrations
docker run -t -i -name hydroshare-migrations \
-link hydroshare-redis:redis \
-link hydroshare-postgis:postgis \
-p 0.0.0.0:80:80 -expose 22 \
-v $PWD:/home/docker/hydroshare
dev.hydroshare.org:5999/hydroshare /usr/bin/python /home/docker/hydroshare/manage.py migrate
docker rm hydroshare-migrations
else
echo "ERROR: Must run migrations from the hydroshare git repository root."
fi