diff --git a/.env.test b/.env.test index 02075b5..d358a67 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,5 @@ DATABASE="postgres" POSTGRES_PASSWORD="testpassword" +POSTGRES_HOST="database" VAPID_PRIVATE_KEY="privatekey" BASE_URL="http://localhost:5173" \ No newline at end of file diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index dde8e22..0ec7fd6 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest container: mcr.microsoft.com/playwright:v1.48.1-jammy services: - postgres: + database: image: postgres env: POSTGRES_PASSWORD: testpassword diff --git a/api/data/settings.ts b/api/data/settings.ts index 7375744..176adab 100644 --- a/api/data/settings.ts +++ b/api/data/settings.ts @@ -1,6 +1,6 @@ export default { database: process.env.DATABASE ?? "postgres", - host: "database", + host: process.env.POSTGRES_HOST ?? "database", user: "postgres", password: process.env.POSTGRES_PASSWORD, port: 5432, diff --git a/api/data/subscription.test.ts b/api/data/subscription.test.ts index bc56625..e63bcf6 100644 --- a/api/data/subscription.test.ts +++ b/api/data/subscription.test.ts @@ -32,7 +32,7 @@ jest.mock("./settings", () => ({ user: "postgres", password: process.env.POSTGRES_PASSWORD, database: "test", - host: "localhost", + host: process.env.POSTGRES_HOST ?? "localhost", })) describe("subscriptions", () => {