forked from openedx-unsupported/devstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovision-coursegraph.sh
More file actions
executable file
·22 lines (17 loc) · 945 Bytes
/
provision-coursegraph.sh
File metadata and controls
executable file
·22 lines (17 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
set -eu -o pipefail
. scripts/colors.sh
set -x
# Pulling the image will almost always be a no-op, but will be important
# when we bump the version in docker-compose.yml or when Neo4j releases a patch.
# Also, this gives us a chance to refresh the container in case it's gotten into
# a weird state.
echo -e "${GREEN} Ensuring Coursegraph image is up to date...${NC}"
docker-compose rm --force --stop coursegraph
docker-compose pull coursegraph
echo -e "${GREEN} Starting Coursegraph and CMS...${NC}"
docker-compose up -d coursegraph studio
sleep 10 # Give Neo4j some time to boot up.
echo -e "${GREEN} Updating CMS courses in Coursegraph...${NC}"
docker-compose exec studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && ./manage.py cms dump_to_neo4j --host coursegraph.devstack.edx --user neo4j --password edx'
echo -e "${GREEN} Coursegraph is now up-to-date with CMS!${NC}"