-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (52 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
55 lines (52 loc) · 1.55 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:
api:
build:
context: .
dockerfile: DealersAndDistributors.Server/Dockerfile
args:
USE_SOLUTION_LIBS: "true"
image: dealers-and-distributors:dev
ports:
- "8080:8080"
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
# Example connection strings (update as needed)
ConnectionStrings__DefaultConnection: "Server=sqlserver,1433;Database=DealersDb;User Id=sa;Password=YourStrong!Passw0rd;TrustServerCertificate=True;"
ConnectionStrings__PostgresConnection: "Host=postgres;Port=5432;Database=dealersdb;Username=postgres;Password=postgres;"
depends_on:
- sqlserver
- postgres
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "YourStrong!Passw0rd"
MSSQL_PID: "Developer"
ports:
- "1433:1433"
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $${MSSQL_SA_PASSWORD} -Q 'SELECT 1' || exit 1"]
interval: 10s
timeout: 5s
retries: 10
volumes:
- sqlserver_data:/var/opt/mssql
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dealersdb
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 10
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
sqlserver_data:
postgres_data: