eebbesen / minutes_maid

Extract data from council meeting documents
MIT License
4 stars 5 forks source link

Dockerize #87

Closed jfudally closed 4 years ago

jfudally commented 4 years ago

This PR builds on #85 by creating a circleci compatible build:

  1. Add a network to docker-compose.yml for remote docker access: https://circleci.com/docs/2.0/docker-compose/
  2. Updates the .circleci/config.yml to use docker-compose and execute commands remotely using a docker container attached to the docker-compose network:

    Note: The primary container runs in a separate environment from Remote Docker and the two cannot communicate directly. To interact with a running service, use docker and a container running in the service’s network.

  3. Add some options to the selenium driver so that chrome runs in a headless, lightweight mode inside of a container: https://dev.to/aergonaut/running-rails-5-system-tests-on-travis-ci-with-chromedriver-4nm7
eebbesen commented 4 years ago

@jfudally this seems to work for me locally (outside of Docker) if I modify config/database.yml as follows

@@ -31,10 +31,12 @@ default: &default

 development:
   <<: *default
+  host: localhost
   database: minutesmaid_development

 test:
   <<: *default
+  host: localhost
   database: minutesmaid_test

Putting these here for my own reference: https://blog.codeship.com/running-rails-development-environment-docker/ https://circleci.com/docs/2.0/local-cli/

jhsu802701 commented 4 years ago

I tried out the Docker setup. All the tests pass, but there were some error messages. They were:

What do I need to do to address these errors?

eebbesen commented 4 years ago

Thanks @jhsu802701!

That output is expected. Those are logging statements generated during the tests when I have tests that test for error conditions.

I don't think I've got true logging in here yet (just puts at this point). With a real logging scaffold in here we could probably suppress logging during test runs.