forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (51 loc) · 2.03 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
build:
cp config/database.yml.example config/database.yml
cp db/schema.rb.example db/schema.rb
docker-compose down --remove-orphans
docker-compose build
redeploy-container:
docker-compose build --pull
docker-compose run --rm web yarn install
docker-compose run --rm web bash -c "rake db:migrate && rake assets:precompile && rake tmp:cache:clear"
docker-compose down --remove-orphans
rm -f ./tmp/pids/server.pid
docker-compose up -d
docker-compose exec -T web bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T mailman bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T sidekiq bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T web bundle exec whenever --update-crontab
docker-compose exec -T web service cron start
deploy-container:
docker-compose run --rm web yarn install
docker-compose run --rm web bash -c "sleep 5 && rake db:migrate && rake assets:precompile"
rm -f ./tmp/pids/server.pid
docker-compose up -d
docker-compose exec -T web bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T mailman bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T sidekiq bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T web bundle exec whenever --update-crontab
docker-compose exec -T web service cron start
test-container:
docker-compose up -d
docker-compose exec -T web rake db:setup
docker-compose exec -T web rake db:migrate
docker-compose exec -T web yarn install
docker-compose exec -T web rake assets:precompile
docker-compose exec -T web rake test:all
docker-compose exec -T web rails test -d
docker-compose down
install-dev:
echo "Installing RubyGems"
bundle install --without production mysql
echo "Installing yarn Packages"
yarn install
echo "Copying example configuartions"
cp db/schema.rb.example db/schema.rb
cp config/database.yml.sqlite.example config/database.yml
echo "Setting up the database"
rake db:setup
setup-complete:
echo "Installing Ruby"
rvm install ruby-2.4.4
echo "Installing Bundler"
gem install bundler