-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
55 lines (52 loc) · 1.21 KB
/
docker-compose.e2e.yml
File metadata and controls
55 lines (52 loc) · 1.21 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
services:
db:
image: postgres:latest
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
POSTGRES_DB: mydb
ports:
- "5432:5432"
healthcheck:
test: pg_isready -U admin -d mydb
interval: 3s
timeout: 3s
retries: 5
server:
build:
context: ./server
dockerfile: Dockerfile
environment:
- DATABASE_URL=postgresql://admin:password@db:5432/mydb?schema=public
- WEB_ORIGIN=http://web
ports:
- "3000:3000"
command: >
sh -c "npx prisma migrate deploy && npm start"
depends_on:
db:
condition: service_healthy
web:
build:
context: ./web
dockerfile: Dockerfile
args:
- VITE_API_URL=http://server:3000
ports:
- "80:80"
e2e:
build:
context: ./
dockerfile: ./e2e/Dockerfile
environment:
- CI=${CI}
- DATABASE_URL=postgresql://admin:password@db:5432/mydb?schema=public
- PLAYWRIGHT_BASE_URL=http://web
- PLAYWRIGHT_API_URL=http://server:3000
volumes:
- ./e2e/playwright-report:/app/playwright-report
- ./e2e/test-results:/app/test-results
ports:
- "9323:9323"
depends_on:
- web