-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cimon.yml
63 lines (61 loc) · 2.04 KB
/
.cimon.yml
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
57
58
59
60
61
62
63
services:
mysql:
from: mysql/mysql-server:5.6
env:
- MYSQL_ROOT_PASSWORD=0123456
- MYSQL_DATABASE=backend_test_db
- MYSQL_USER=cimon
- MYSQL_PASSWORD=6543210
elastic:
from: elasticsearch:2.2.1
redis:
from: redis:3.0.2
rails:
from: mwallasch/docker-ruby-node
cache:
- /bundle
- /app/public/assets
- /app/public/uploads
env:
- DATABASE_URL=mysql2://cimon:[email protected]:3306/backend_test_db
build:
- apt-get update
- apt-get install --reinstall wamerican
- apt-get install -y libqt4-dev pkg-config
- apt-get install -y curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev libmysqlclient-dev
- apt-get install build-essential
- gem install foreman
- gem install bundler -v 1.3.6
test:
prepare:
- sh -c "cd ./backend && bundle install --path /bundle --quiet"
- sh -c 'sleep 30'
- sh -c "cd ./backend && bundle exec rake db:schema:load test --trace"
# - echo -n 'Waiting for elasticsearch:' && while ! nc 127.0.0.1 9200 </dev/null; do echo -n '.'; sleep 1; done && echo -n ' Done\n'
# - sh -c "cd ./backend && bin/rake db:create"
service: rails
dependencies: [mysql, redis, elastic]
folder: /app
cmd: sh -c "cd ./backend && bin/rspec -f d"
env:
- RAILS_ENV=test
- RACK_ENV=test
staging:
prepare:
- sh -c "cd ./backend && bundle install --path /bundle --quiet"
- sh -c 'sleep 30'
- sh -c "cd ./backend && bin/rake db:migrate --silent"
- sh -c "cd ./backend && bin/rake assets:precompile --silent"
- sh -c "cd ./frontend && npm install --silent"
# - sh -c "cd ./frontend && npm install bower -g"
# - sh -c "cd ./frontend && bower install --allow-root"
service: rails
dependencies: [mysql, redis, elastic]
folder: /app
cmd: foreman start
ports: [80, 3000]
env:
- RAILS_ENV=production
- RACK_ENV=production
- PORT=80
- SECRET_KEY_BASE=ecf12e576da27f0ce0db83430f0a39643e860ca8b4b58d4066e93013c9861989b6