fix: separate databases and redis instances

This commit is contained in:
Karol Sójko
2023-07-28 12:00:17 +02:00
parent b53b67328f
commit f7d33c7164
+11 -4
View File
@@ -67,6 +67,13 @@ jobs:
matrix:
db_type: [mysql, sqlite]
cache_type: [redis, memory]
include:
- cache_type: redis
db_type: mysql
redis_port: 6380
- cache_type: redis
db_type: sqlite
redis_port: 6381
runs-on: ubuntu-latest
@@ -78,14 +85,14 @@ jobs:
cache:
image: redis
ports:
- 6379:6379
- ${{ matrix.redis_port }}:6379
db:
image: mysql
ports:
- 3307:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: standardnotes
MYSQL_DATABASE: standardnotes_${{ matrix.cache_type }}}
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
@@ -119,12 +126,12 @@ jobs:
echo "REVISIONS_FREQUENCY=5" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3307" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes_${{ matrix.cache_type }}}" >> 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
echo "REDIS_URL=redis://localhost" >> packages/home-server/.env
echo "REDIS_URL=redis://localhost:${{ matrix.redis_port }}" >> packages/home-server/.env
echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
echo "E2E_TESTING=true" >> packages/home-server/.env