fix: separate database for different configuration

This commit is contained in:
Karol Sójko
2023-07-27 14:19:11 +02:00
parent fee1f1a3a7
commit 959a11293a
2 changed files with 13 additions and 3 deletions

2
.github/ci.env vendored
View File

@@ -1,5 +1,5 @@
PUBLIC_FILES_SERVER_URL=http://localhost:3125
DB_HOST=db
DB_HOST=db_for_docker
DB_USERNAME=std_notes_user
DB_PASSWORD=changeme123
DB_DATABASE=standard_notes_db

View File

@@ -71,7 +71,7 @@ jobs:
image: redis
ports:
- 6379:6379
db:
db_for_docker:
image: mysql
ports:
- 3306:3306
@@ -80,6 +80,15 @@ jobs:
MYSQL_DATABASE: standardnotes
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
db_for_home_server:
image: mysql
ports:
- 3307:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: standardnotes
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
steps:
- uses: actions/checkout@v3
@@ -110,8 +119,9 @@ jobs:
echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
echo "REVISIONS_FREQUENCY=5" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3306" >> packages/home-server/.env
echo "DB_PORT=3307" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
echo "DB_SQLITE_DATABASE_PATH=sqlite_${{ matrix.cache_type }}.db" >> packages/home-server/.env
echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env