-
get latest docker travis build tag and run it in the background
docker run -dit travisci/ci-ruby:packer-1494868441 /sbin/init -
exec container
docker exec -it <container_id> bash -l -
change user
su - travis -
install ruby 2.5.1
rvm use 2.5.1 --install --binary --fuzzy ruby -v -
add your ssh keys and chmod 600
-
add your git config user and email
-
clone the repo
git clone --depth=50 --branch=master [email protected]:element-group/ico-platform.git -
gem update
gem update --system gem update bundler -
run install commands script
-
start redis
redis-server& -
postgres
sudo apt-get update sudo apt-get upgrade -
enable postgres crypto
CREATE EXTENSION pgcrypto; SHOW config_file;/etc/postgresql/9.5/main/postgresql.conf
listen: localhost */etc/postgresql/9.5/main/pg_hba.conf
local all travis trust host all travis 0.0.0.0/0 trust host all travis ::/0 trust -
set environment variables
export MY_VAR=my_value -
migrate
./bin/rails db:environment:set RAILS_ENV=test ./bin/rake db:schema:load
docker commit <container_id>