-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
56 lines (51 loc) · 1.41 KB
/
docker-compose.e2e.yml
File metadata and controls
56 lines (51 loc) · 1.41 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
# Docker Compose for E2E testing with Playwright
# Works with both Docker and Podman Compose on Fedora (with SELinux)
#
# Usage:
# podman-compose -f docker-compose.e2e.yml up --build
# podman-compose -f docker-compose.e2e.yml down -v
services:
myblog-web:
build:
context: ./src
dockerfile: MyBlog.Web/Dockerfile
container_name: myblog-web
ports:
- "5000:5000"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:5000
- ConnectionStrings__DefaultConnection=Data Source=/app/data/myblog.db
- Authentication__DefaultAdminPassword=ChangeMe123!
volumes:
# :Z suffix for SELinux on Fedora - creates private unshared label
- myblog-data:/app/data:Z
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
interval: 5s
timeout: 10s
retries: 10
start_period: 30s
networks:
- myblog-network
myblog-e2e:
build:
context: ./src
dockerfile: MyBlog.E2E/Dockerfile
container_name: myblog-e2e
depends_on:
myblog-web:
condition: service_healthy
environment:
- MYBLOG_BASE_URL=http://myblog-web:5000
- PLAYWRIGHT_HEADLESS=true
volumes:
# Test results output with SELinux label
- ./test-results:/tests/TestResults:Z
networks:
- myblog-network
networks:
myblog-network:
driver: bridge
volumes:
myblog-data: