-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate the setup of MySQL, PostgreSQL, and SQLite3 into individual …
…scripts
- Loading branch information
1 parent
86ecd00
commit 8ed66bf
Showing
4 changed files
with
75 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
sudo apt-get install -y --no-install-recommends default-mysql-client | ||
|
||
docker run \ | ||
--name redmine-mysql \ | ||
-e MYSQL_ROOT_PASSWORD=password \ | ||
-e MYSQL_DATABASE=redmine_test \ | ||
-p 3306:3306 \ | ||
-d $DATABASE \ | ||
--character-set-server=utf8mb4 \ | ||
--collation-server=utf8mb4_unicode_ci | ||
|
||
cd $REDMINE_DIR | ||
cat <<EOS > config/database.yml | ||
test: | ||
adapter: mysql2 | ||
database: redmine_test | ||
host: 127.0.0.1 | ||
port: 3306 | ||
username: root | ||
password: password | ||
encoding: utf8mb4 | ||
EOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
sudo apt-get install -y --no-install-recommends libpq-dev | ||
|
||
docker run \ | ||
--name redmine-postgres \ | ||
-e POSTGRES_PASSWORD=postgres \ | ||
-p 5432:5432 \ | ||
-d $DATABASE | ||
|
||
cd $REDMINE_DIR | ||
cat <<EOS > config/database.yml | ||
test: | ||
adapter: postgresql | ||
database: redmine_test | ||
encoding: utf8 | ||
host: localhost | ||
port: 5432 | ||
username: postgres | ||
password: postgres | ||
EOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
sudo apt-get install -y --no-install-recommends libsqlite3-dev | ||
|
||
cd $REDMINE_DIR | ||
cat <<EOS > config/database.yml | ||
test: | ||
adapter: sqlite3 | ||
database: db/test.sqlite3 | ||
EOS |