-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlocal_dev_init.sh
More file actions
executable file
·29 lines (22 loc) · 1001 Bytes
/
local_dev_init.sh
File metadata and controls
executable file
·29 lines (22 loc) · 1001 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
27
28
29
#!/bin/bash
echo "This script will destroy and replace any already existing solr dev and test instances."
echo "Run 'rake solr:backup' first to retain an already existing dev instance."
echo "Set $UMEDIA_SOLR_CORE_VERSION to a git branch, tag, or commit (default main)"
read -p "Continue, destroying any already existing instances? [y|n]" -n 1 -r
core_version=${UMEDIA_SOLR_CORE_VERSION:-main}
if [[ $REPLY =~ ^[Yy]$ ]]
then
docker-compose stop
# BUILD the local solr core
git clone git@github.com:UMNLibraries/umedia_solr_conf.git;
(cd umedia_solr_conf; git checkout $core_version; ./rebuild.sh dev; ./rebuild.sh test);
# BUILD the App
cp -n .env.example .env # n = "no clobber: don't overwrite if already there"
docker-compose build;
(docker-compose run app yarn install)
echo "sudo chown -R $(whoami):$(whoami) node_modules"
sudo chown -R $(whoami):$(whoami) node_modules
# Create the snapshot directories
mkdir -p snapshots;
cp -R snapshots_test/* snapshots
fi