Repository navigation
Expand file tree
/
Copy pathdocker-compose.test-auth.yml
More file actions
62 lines (59 loc) · 2.06 KB
/
Copy pathdocker-compose.test-auth.yml
File metadata and controls
62 lines (59 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Docker Compose for integration tests WITH authentication enabled.
# This is separate from docker-compose.test.yml which tests with AUTH_ENABLED=false.
#
# Usage:
# bun run test:integration:auth
#
# Note: These tests verify that BetterAuth routes are properly mounted and respond
# when AUTH_ENABLED=true. They don't test full OAuth flows (which require real providers).
services:
postgres-test-auth:
image: postgres:18
container_name: planningsup_test_auth_db
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: planningsup_test_auth
ports:
- '5434:5432'
networks:
- planningsup_test_auth_network
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U testuser -d planningsup_test_auth']
interval: 5s
timeout: 5s
retries: 10
app-test-auth:
build:
context: .
args:
BUN_VERSION: ${BUN_VERSION:-1.4.2}
container_name: planningsup_test_auth_app
environment:
NODE_ENV: production
PORT: 20001
DATABASE_URL: postgresql://testuser:testpass@postgres-test-auth:5432/planningsup_test_auth
RUN_JOBS: false
# Auth is ENABLED for these tests
AUTH_ENABLED: 'true'
# BetterAuth secret (required for auth to work)
BETTER_AUTH_SECRET: 'test-secret-for-integration-tests-only-do-not-use-in-production'
# Dummy OAuth credentials (routes will be mounted but OAuth won't work without real creds)
DISCORD_CLIENT_ID: 'test-discord-client-id'
DISCORD_CLIENT_SECRET: 'test-discord-client-secret'
GITHUB_CLIENT_ID: 'test-github-client-id'
GITHUB_CLIENT_SECRET: 'test-github-client-secret'
# Public origin (used by passkey rpID derivation)
PUBLIC_ORIGIN: 'http://localhost:20001'
# Trusted origins for CORS
TRUSTED_ORIGINS: 'http://localhost:20001,http://localhost:3000'
ports:
- '20001:20001'
depends_on:
postgres-test-auth:
condition: service_healthy
networks:
- planningsup_test_auth_network
networks:
planningsup_test_auth_network:
driver: bridge