Separate services for postgres and mysql

This commit is contained in:
Valentin Rigal 2023-07-13 11:02:38 +02:00 коммит произвёл Sebastian Hengst
Родитель c25f250827
Коммит f47da7b38d
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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"