forked from nickelsen/ggtrackerstack
-
Notifications
You must be signed in to change notification settings - Fork 10
/
install-ggtrackerstack.sh
40 lines (34 loc) · 1.13 KB
/
install-ggtrackerstack.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
#!/bin/bash
set -e
cd /vagrant
echo INSTALLING GGTRACKER
# install ggtracker
(cd ggtracker && \
bundle && \
cp -np config/secrets.yml{.example,} && \
cp -np config/s3.yml{.example,} && \
rake db:create && \
bundle exec rake db:schema:load)
echo INSTALLING ESDB
(cd esdb && \
cp -np config/database.yml{.example,} && \
bundle && \
(mysql -u root <<-"EOF"
create database if not exists esdb_development;
create database if not exists esdb_test;
EOF
) && \
cp -np config/s3.yml{.example,} && \
cp -np config/fog.rb{.example,} && \
cp -np config/redis.yml{.example,} && \
cp -np config/esdb.yml{.example,} && \
cp -np config/tokens.yml{.example,} && \
bundle exec sequel -m db/migrations -e development config/database.yml && \
cat db/league_tables.sql | mysql -u root -D esdb_development && \
cat db/ggtracker_provider.sql | mysql -u root -D esdb_development && \
cat db/add_ai_identities.sql | mysql -u root -D esdb_development && \
bundle exec rake py:init && \
bundle exec sequel -m db/migrations -e test config/database.yml && \
echo RUNNING TESTS && \
bundle exec rspec)
echo DONE install-ggtrackerstack.sh