-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
93 lines (87 loc) · 2.34 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
93 lines (87 loc) · 2.34 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
version: '3.8'
services:
# ef-migration-diff CLI tool for development
ef-migration-diff:
build:
context: .
dockerfile: Dockerfile
container_name: ef-migration-diff-dev
volumes:
- .:/workspace:cached
- ~/.nuget/packages:/root/.nuget/packages:ro
- /workspace/.cache
environment:
- ASPNETCORE_ENVIRONMENT=Development
- EFMIGDIFF_CACHE_ENABLED=false
- EFMIGDIFF_LOG_LEVEL=Debug
- DOTNET_USE_POLLING_FILE_WATCHER=true
- DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
working_dir: /workspace
command: ["dotnet", "watch", "run", "--project", "ef-migration-diff.csproj", "--no-launch-profile"]
ports:
- "5000:5000"
- "5001:5001"
depends_on:
sqlserver:
condition: service_healthy
postgres:
condition: service_healthy
mysql:
condition: service_healthy
# SQL Server for testing migrations
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: sqlserver-test-dev
environment:
SA_PASSWORD: "TestPassword123!"
ACCEPT_EULA: "Y"
MSSQL_PID: Developer
ports:
- "1433:1433"
volumes:
- sqlserver-data-dev:/var/opt/mssql
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "SA", "-P", "TestPassword123!", "-Q", "SELECT 1"]
interval: 10s
timeout: 3s
retries: 10
# PostgreSQL for testing migrations
postgres:
image: postgres:16-alpine
container_name: postgres-test-dev
environment:
POSTGRES_DB: testdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres-data-dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 3s
retries: 10
# MySQL for testing migrations
mysql:
image: mysql:8.0
container_name: mysql-test-dev
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: testdb
ports:
- "3306:3306"
volumes:
- mysql-data-dev:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 3s
retries: 10
volumes:
sqlserver-data-dev:
postgres-data-dev:
mysql-data-dev:
networks:
default:
name: ef-migration-diff-dev-network