Add Docker Config file for travis
This commit is contained in:
@ -15,7 +15,7 @@ before_install:
|
||||
# Config to run docker tests - doesn't work so far
|
||||
# - sudo apt-get update
|
||||
# - sudo apt-get upgrade lxc-docker
|
||||
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock --iptables=false"' | sudo tee /etc/default/docker > /dev/null
|
||||
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2376 -H unix:///var/run/docker.sock --iptables=false"' | sudo tee /etc/default/docker > /dev/null
|
||||
# - export DOCKER_HOST=tcp://192.168.23.75:2375
|
||||
- sudo service docker restart
|
||||
- sleep 5
|
||||
@ -27,6 +27,7 @@ before_script:
|
||||
- cp config/code_ocean.yml.travis config/code_ocean.yml
|
||||
- cp config/database.yml.travis config/database.yml
|
||||
- cp config/secrets.yml.travis config/secrets.yml
|
||||
- cp config/docker.yml.erb.travis config/docker.yml.erb
|
||||
- psql --command='CREATE DATABASE travis_ci_test;' --username=postgres
|
||||
- bundle exec rake db:schema:load RAILS_ENV=test
|
||||
|
||||
|
40
config/docker.yml.erb.travis
Normal file
40
config/docker.yml.erb.travis
Normal file
@ -0,0 +1,40 @@
|
||||
#Why erb?
|
||||
default: &default
|
||||
connection_timeout: 3
|
||||
pool:
|
||||
active: false
|
||||
ports: !ruby/range 4500..4600
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
host: tcp://127.0.0.1:2376
|
||||
ws_host: ws://127.0.0.1:2376 #url to connect rails server to docker host
|
||||
ws_client_protocol: ws:// #set the websocket protocol to be used by the client to connect to the rails server (ws on development, wss on production)
|
||||
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
|
||||
pool:
|
||||
active: true
|
||||
refill:
|
||||
async: false
|
||||
batch_size: 8
|
||||
interval: 15
|
||||
timeout: 60
|
||||
#workspace_root: <%= File.join('/', 'shared', Rails.env) %>
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
host: unix:///var/run/docker.sock
|
||||
pool:
|
||||
active: true
|
||||
refill:
|
||||
async: false
|
||||
batch_size: 8
|
||||
interval: 15
|
||||
timeout: 60
|
||||
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
|
||||
ws_host: ws://localhost:4243 #url to connect rails server to docker host
|
||||
ws_client_protocol: wss:// #set the websocket protocol to be used by the client to connect to the rails server (ws on development, wss on production)
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
host: tcp://192.168.59.104:2376
|
||||
workspace_root: <%= File.join('/', 'shared', Rails.env) %>
|
Reference in New Issue
Block a user