-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
116 lines (110 loc) · 2.98 KB
/
docker-compose.yml
File metadata and controls
116 lines (110 loc) · 2.98 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: scraper
POSTGRES_PASSWORD: scraper
POSTGRES_DB: compliance_scraper
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U scraper -d compliance_scraper"]
interval: 5s
timeout: 5s
retries: 5
oidc-mock:
image: ghcr.io/navikt/mock-oauth2-server:2.1.10
ports:
- "8090:8090"
environment:
SERVER_PORT: "8090"
JSON_CONFIG: |
{
"interactiveLogin": false,
"tokenCallbacks": [{
"issuerId": "default",
"requestMappings": [{
"requestParam": "scope",
"match": "*",
"claims": {
"sub": "test-user",
"email": "[email protected]",
"email_verified": true,
"display_name": "Test User",
"name": "Test User"
}
}]
}]
}
oidc-mock-ready:
image: curlimages/curl:latest
depends_on:
oidc-mock:
condition: service_started
entrypoint: ["sleep", "infinity"]
healthcheck:
test: ["CMD", "curl", "-fsS", "http://oidc-mock:8090/isalive"]
interval: 3s
timeout: 3s
retries: 10
compliance-scraper:
build: .
depends_on:
postgres:
condition: service_healthy
oidc-mock-ready:
condition: service_healthy
env_file:
- path: .env
required: false
environment:
DATABASE_URL: postgres://scraper:scraper@postgres:5432/compliance_scraper
AWS_REGION: eu-west-2
BEDROCK_MODEL_ID: eu.anthropic.claude-haiku-4-5-20251001-v1:0
SERVICES_JSON_PATH: /app/services.json
SEED_DATABASE: "true"
NODE_ENV: development
APP_URL: http://compliance-scraper:3000
SSO_ISSUER: http://oidc-mock:8090/default
SSO_CLIENT_ID: test-client
SSO_CLIENT_SECRET: test-secret
ports:
- "3000:3000"
healthcheck:
test: curl -f http://localhost:3000/health || exit 1
interval: 5s
timeout: 5s
retries: 5
adminer:
image: adminer:latest
environment:
ADMINER_DEFAULT_SERVER: postgres
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:8080"
e2e-test:
profiles: [test]
image: mcr.microsoft.com/playwright:v1.59.1-noble
working_dir: /app
depends_on:
compliance-scraper:
condition: service_healthy
environment:
CI: "true"
PLAYWRIGHT_BASE_URL: http://compliance-scraper:3000
volumes:
- .:/app
- e2e-node-modules:/app/node_modules
- ./playwright-report:/app/playwright-report
- ./test-results:/app/test-results
command: >
bash -c "npm install -g $$(npm pkg get packageManager | tr -d '\"')
&& pnpm install --frozen-lockfile
&& pnpm exec playwright test"
volumes:
postgres_data:
e2e-node-modules: