-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup-dev-env.sh
executable file
·38 lines (29 loc) · 1.37 KB
/
setup-dev-env.sh
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
30
31
32
33
34
35
36
37
38
# set up .env file
cp -n .env.example .env
cp -n docker-compose.yml docker-compose.custom.yml
# copy docker configs into projects if needed
cp -n ../metaspace/engine/conf/config.docker.json ../metaspace/engine/conf/config.json
cp -n ../metaspace/graphql/config/development.docker.js ../metaspace/graphql/config/development.js
cp -n ../metaspace/webapp/src/clientConfig.docker.json ../metaspace/webapp/src/clientConfig.json
# start everything
docker-compose up -d
echo "Waiting 10 seconds for everything to run init scripts..."
sleep 10
# set up ElasticSearch
echo "Creating ElasticSearch index"
docker-compose run --rm api /sm-engine/create-es-index.sh
# re-run postgres init script in case it didn't run correctly the first time
echo "Initializing postgres schema (\"already exists\" errors can be safely ignored)"
docker-compose exec postgres sh /docker-entrypoint-initdb.d/create-sm.sh
# set up molecular DB
echo "Installing molecular databases"
docker-compose run --rm api /sm-engine/install-dbs.sh
# download mol images (Excluded because it's slow and rarely needed)
# echo "Downloading molecule images"
# ./fetch-mol-images.sh
# set up ML Scoring Model
echo "Installing scoring models"
docker-compose run --rm api /sm-engine/install-scoring-model.sh
# set up enrichment databases
echo "Installing enrichment databases"
docker-compose run --rm api /sm-engine/install-enrichment-dbs.sh