A repository for intermolecular interactions - http://suprabank.org
Offical Docker Image: https://hub.docker.com/r/stephansinn/suprabank.org
- Docker CE (community edition): https://docs.docker.com/install/
- Docker Compose https://docs.docker.com/compose/install/
You might need sudo rights.
Clone the repository from the development branch
git clone https://github.com/StephanSinn/suprabank.git
cp ./.env.example ./.env
No local postgresql server should be running
service postgresql stop
It might be necessary to increase the HTTP timeout
export COMPOSE_HTTP_TIMEOUT=240
Start the container
docker-compose up -d
If there are problems with gems, first stop the container with
docker-compose down
and then uncomment the following two lines in docker_entrypoint.sh
bundle update
bundle install --path vendor/bundle
and start the container again
docker-compose up -d
docker-compose exec web bash
docker-compose exec web bash
In the docker bash:
rake test
If this fails, try:
bundle exec rake test
docker-compose down
If this fails, call first
sudo aa-remove-unknown
and then try again.
build the docker image locally using the following command:
docker build -t stephansinn/suprabank.org .
to launch the local development environment run
docker-compose up -d
The database will be empty, does you need some data to work with.
docker-compose exec web bash
In the docker bash:
rake db:seed
rake interactor:runall
If this fails, try:
bundle exec rake db:seed
bundle exec rake interactor:runall
These two comments will feed the Technique and AssayType arrays as well as generate some Users, Molecules and Interactions to work with. All defined in lib/tasks/interactor.rake If you want to have an user with admin rights, you need to change the role of one of the users: Open the rails console in the docker bash:
rails c
and then e.g.:
user = User.find_by(email:"user1@gmail.com")
user.admin!
We use the byebug gem for debugging, it is already available in test and development environment. docker-compose up does not support interactive debugging. docker/compose#4677
stop the running containers and start two instances via run to have the server
docker-compose down
docker-compose run --service-ports web
and the bash.
docker-compose run web bash
Tutorial we followed to create the series of commands / steps listed below: https://thoughtbot.com/blog/rails-on-docker
We follow the "Github Flow" branching strategy. If you want to learn more: https://guides.github.com/introduction/flow/
- checkout
development - create feature branch
- commit
- push
- open pull request to
development