-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathfirst_run.sh
executable file
·42 lines (30 loc) · 1002 Bytes
/
first_run.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
39
40
41
#!/bin/sh
set -x
# check if service core db and catarse db are up
docker-compose up -d service_core_db catarse_db
#wait small time
sleep 5
# running service_core_migrations
docker-compose up migrations
# add sample data
docker-compose exec service_core_db sh -c "psql -d service_core -h localhost -U postgres < /sample.seed.sql"
docker-compose exec service_core_db sh -c "psql -d service_core -h localhost -U postgres < /setup_fdw_grants.sql"
# running catarse migrations
docker-compose up catarse_migrations
# up catarse rails
docker-compose up -d catarse
sleep 10
# running dev demo settings
docker-compose exec catarse bundle exec rake dev_seed:demo_settings
sleep 5
# running generate fdw
docker-compose exec catarse bundle exec rake common:generate_fdw
sleep 5
# rerun migrations
docker-compose up catarse_migrations
# install front end dependencies
docker-compose exec catarse npm install
# up all
docker-compose up -d
# restart catarse to ensure token
docker-compose restart catarse