Commit 371719ca by Feanil Patel

Exposing ports to the host causes the tests to be flaky.

ERROR: for db  Cannot start service db: driver failed programming external connectivity on endpoint db (7a7976dfaf7ead9b104702282b06bab15691f264bff93806abd17ddf10490a3a): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use

I think this happens because other tests are using the same port
ocassionally. Moving to using a separate test docker-compose file
so we don't have to mest with the development travis file.
parent 898eb869
......@@ -8,15 +8,13 @@ services:
sudo: required
# Cache the pip directory. "cache: pip" doesn't work due to install override. See https://github.com/travis-ci/travis-ci/issues/3239.
cache:
- directories:
- $HOME/.cache/pip
- node_modules
- course_discovery/static/bower_components
before_install:
- docker-compose -f docker-compose.yml up -d
- docker-compose -f .travis/docker-compose-travis.yml up -d
script:
- docker exec course-discovery /edx/app/discovery/discovery/.travis/run_tests.sh
......
version: "2"
services:
db:
image: mysql:5.6
container_name: db
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
environment:
MYSQL_ROOT_PASSWORD: ""
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: "discov001"
MYSQL_PASSWORD: "password"
MYSQL_DATABASE: "discovery"
es:
image: elasticsearch:1.5.2
container_name: es
memcache:
image: memcached:1.4.24
container_name: memcache
course-discovery:
# Uncomment this line to use the official course-discovery base image
image: edxops/course-discovery:bilal-test
# Uncomment the next two lines to build from a local configuration repo
# build: ../configuration/docker/build/discovery/
container_name: course-discovery
volumes:
- ..:/edx/app/discovery/discovery
- ../course_discovery/media:/edx/var/discovery/media
- ../course_discovery/assets:/edx/var/discovery/staticfiles
command: tail -f /dev/null
depends_on:
- "db"
- "es"
- "memcache"
environment:
TEST_ELASTICSEARCH_URL: "http://es:9200"
ENABLE_DJANGO_TOOLBAR: 1
......@@ -33,7 +33,7 @@ services:
course-discovery:
# Uncomment this line to use the official course-discovery base image
image: edxops/course-discovery:bilal-test
image: edxops/course-discovery:latest
# Uncomment the next two lines to build from a local configuration repo
# build: ../configuration/docker/build/discovery/
......@@ -55,4 +55,3 @@ services:
- "18381:18381"
- "8381:8381"
- "48381:48381"
command: tail -f /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment