Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker for testing #281

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Docker for testing #281

wants to merge 18 commits into from

Conversation

jtv8
Copy link
Contributor

@jtv8 jtv8 commented Jun 13, 2017

This PR:

  • Dockerizes the knowledge_repo application, using an image based on the current Travis build environment
  • Updates the Travis build/test script to use the dockerized application
  • Adds a system test container to check that the application is being served correctly (this consists of a stub for now with just one test to check that GET /feed returns a page)
  • Deploys a Docker image to Docker Hub, providing that the environment variables DOCKER_USERNAME, DOCKER_PASSWORD and DOCKER_REPO are configured in Travis
  • Adds a requirements.txt so that prerequisites can be installed in a Docker layer without running setup.py (improves caching of Docker layers during development)
  • Adds environment variables PYPI_USER, PYPI_PASS_SECURE and PYPI_REPO to make the deploy process to PyPI configurable in Travis (and prevent deploy being triggered from an outside fork like this one!)

Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj

@jtv8 jtv8 mentioned this pull request Jul 6, 2017
@jtv8 jtv8 force-pushed the docker_for_testing branch 5 times, most recently from 03415f2 to 42237b6 Compare July 10, 2017 17:27
@said026
Copy link

said026 commented Aug 21, 2017

Hi @zerogjoe,

Thanks for you contribution 👍 , I have some issues with the pycosat dependency, when trying to build the Docker image I get the following error :

Collecting pycosat==0.6.2
  Could not find a version that satisfies the requirement pycosat==0.6.2 (from versions: 0.6.1)
No matching distribution found for pycosat==0.6.2

Switching the package version to 0.6.1 seems to fix the problem.

Regards,
Said026

@irdvl
Copy link

irdvl commented Mar 3, 2018

In case anyone else runs into this in the future - I had problems with running the container and getting a RuntimeError: Database configuration is not suitable for deployment (not thread-safe). error. Adding --engine flask as per this issue to CMD ["bash", "-c", "knowledge_repo --repo ./default_repo deploy --port ${PORT} --engine flask"] fixed the problem.

@phatlast96
Copy link

@zerogjoe Can you document setting up local testing environment in the folder /docs so that it's easier for a person who has just discovered this repository to easily contribute right away?

Currently, the churn rate for contributing (especially for me) is pretty high due to lack of knowledge on setting things up properly on your machine. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants