Use correct var for detecting MySQL

This commit is contained in:
Jyri-Petteri Paloposki 2024-10-23 01:52:02 +03:00
parent e70a569511
commit 24c4634a7b
5 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ export DATABASE_NAME=tracks_test
$docker_compose build $docker_compose build
$docker_compose up -d $docker_compose up -d
script/poll-for-db script/poll-for-db $2
# Leaving this in since it will be needed for Rails 5 # Leaving this in since it will be needed for Rails 5
$docker_compose run web bin/rails db:environment:set RAILS_ENV=test || true $docker_compose run web bin/rails db:environment:set RAILS_ENV=test || true

View file

@ -2,7 +2,7 @@
echo "==> Polling DB…" echo "==> Polling DB…"
if [ "$DATABASE_TYPE" == "mysql" ]; then if [ "$1" == "mysql" ]; then
appdir=$(cd $(dirname "$0")/.. && pwd) appdir=$(cd $(dirname "$0")/.. && pwd)
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@ [ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@

View file

@ -11,7 +11,7 @@ services:
args: args:
RUBY_VERSION: ${RUBY_VERSION} RUBY_VERSION: ${RUBY_VERSION}
environment: environment:
# These are set in script/ci-build, so we need to pass-thru them. # These are set in script/cibuild, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV RAILS_ENV: $RAILS_ENV
DATABASE_NAME: $DATABASE_NAME DATABASE_NAME: $DATABASE_NAME
DATABASE_USERNAME: root DATABASE_USERNAME: root

View file

@ -11,7 +11,7 @@ services:
args: args:
RUBY_VERSION: ${RUBY_VERSION} RUBY_VERSION: ${RUBY_VERSION}
environment: environment:
# These are set in script/ci-build, so we need to pass-thru them. # These are set in script/cibuild, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV RAILS_ENV: $RAILS_ENV
DATABASE_NAME: $DATABASE_NAME DATABASE_NAME: $DATABASE_NAME
DATABASE_USERNAME: postgres DATABASE_USERNAME: postgres

View file

@ -6,7 +6,7 @@ services:
args: args:
RUBY_VERSION: ${RUBY_VERSION} RUBY_VERSION: ${RUBY_VERSION}
environment: environment:
# These are set in script/ci-build, so we need to pass-thru them. # These are set in script/cibuild, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV RAILS_ENV: $RAILS_ENV
DATABASE_NAME: "/app/db/db.sqlite" DATABASE_NAME: "/app/db/db.sqlite"
DATABASE_TYPE: sqlite3 DATABASE_TYPE: sqlite3