forked from edly-io/devstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision-registrar.sh
executable file
·22 lines (15 loc) · 1.22 KB
/
provision-registrar.sh
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
name=registrar
port=18734
docker-compose up -d $name
echo -e "${GREEN}Installing requirements for ${name}...${NC}"
docker-compose exec ${name} bash -c 'source /edx/app/registrar/registrar_env && cd /edx/app/registrar/registrar && make requirements' -- "$name"
echo -e "${GREEN}Running migrations for ${name}...${NC}"
docker-compose exec ${name} bash -c 'source /edx/app/registrar/registrar_env && cd /edx/app/registrar/registrar && make migrate' -- "$name"
echo -e "${GREEN}Creating super-user for ${name}...${NC}"
docker-compose exec ${name} bash -c 'source /edx/app/registrar/registrar_env && cd /edx/app/registrar/registrar && make createsuperuser' -- "$name"
./provision-ida-user.sh ${name} ${name} ${port}
# Compile static assets last since they are absolutely necessary for all services. This will allow developers to get
# started if they do not care about static assets
echo -e "${GREEN}Compiling static assets for ${name}...${NC}"
docker-compose exec ${name} bash -c ' if ! source /edx/app/registrar/registrar_env && cd /edx/app/registrar/registrar && make static 2>registrar_make_static.err; then echo "------- Last 100 lines of stderr"; tail regsitrar_make_static.err -n 100; echo "-------"; fi;' -- "$name"