зеркало из https://github.com/mozilla/treeherder.git
Separate services for postgres and mysql
This commit is contained in:
Родитель
c25f250827
Коммит
f47da7b38d
|
@ -17,8 +17,13 @@ function check_service () {
|
|||
}
|
||||
|
||||
# Keep these in sync with DATABASE_URL.
|
||||
check_service "MySQL" "mysql" 3306
|
||||
check_service "PostgreSQL" "postgres" 5432
|
||||
echo "Checking database status at $DATABASE_URL"
|
||||
if [[ ${DATABASE_URL:0:8} == "mysql://" ]]; then
|
||||
check_service "MySQL" "mysql" 3306;
|
||||
fi
|
||||
if [[ ${DATABASE_URL:0:7} == "psql://" ]]; then
|
||||
check_service "PostgreSQL" "postgres" 5432;
|
||||
fi
|
||||
|
||||
# Keep these in sync with CELERY_BROKER_URL.
|
||||
check_service "RabbitMQ" "rabbitmq" 5672
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -45,7 +45,7 @@ commands_post =
|
|||
whitelist_externals=
|
||||
docker-compose
|
||||
commands_pre =
|
||||
docker-compose build
|
||||
docker-compose up --build --detach mysql redis rabbitmq
|
||||
commands =
|
||||
docker-compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
|
||||
|
||||
|
@ -53,7 +53,7 @@ commands =
|
|||
whitelist_externals=
|
||||
docker-compose
|
||||
commands_pre =
|
||||
docker-compose build
|
||||
docker-compose up --build --detach postgres redis rabbitmq
|
||||
commands =
|
||||
docker-compose run -e TREEHERDER_DEBUG=False -e DATABASE_URL=psql://postgres:mozilla1234@postgres:5432/treeherder backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче