-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
30 lines (28 loc) · 930 Bytes
/
docker-compose.ci.yml
File metadata and controls
30 lines (28 loc) · 930 Bytes
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
# CI/CD compose file — runs tests inside Docker, matching local dev workflow.
# Usage: docker compose -f docker-compose.ci.yml up --build --exit-code-from web
services:
web:
build: .
environment:
- NODE_ENV=test
- DATABASE_URL=postgresql://ticketing_user:ticketing_pass@db:5432/ticketing_db
- SESSION_SECRET=ci-session-secret-minimum-thirty-two-characters-long
- LOG_LEVEL=error
depends_on:
db:
condition: service_healthy
volumes:
- ./coverage:/usr/src/app/coverage
command: npm run test:coverage
entrypoint: ['/usr/local/bin/docker-entrypoint.sh']
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: ticketing_user
POSTGRES_PASSWORD: ticketing_pass
POSTGRES_DB: ticketing_db
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ticketing_user -d ticketing_db']
interval: 5s
timeout: 3s
retries: 10