-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
86 lines (83 loc) · 2.88 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
86 lines (83 loc) · 2.88 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
name: opencashflow-dev
services:
db:
image: postgres:16-alpine
container_name: opencashflow-dev-db
environment:
- POSTGRES_DB=opencashflow
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 30
api:
build:
context: .
dockerfile: src/OpenCashFlow.API/Dockerfile
container_name: opencashflow-dev-api
depends_on:
db:
condition: service_healthy
environment:
# ASP.NET
- ASPNETCORE_ENVIRONMENT=Development
# DB connection for EF Core
- DEFAULT_CONN_STRING=Host=db;Database=opencashflow;Username=postgres;Password=postgres
# JWT settings (match WebApp)
- JwtSettings__SecretKey=local-development-secret-key-change-before-production-0001
- JwtSettings__Issuer=http://api:8080
- JwtSettings__Audience=http://webapp:8080
# CORS origins (host ports)
- Cors__AllowedOrigins__0=http://localhost:5200
- Cors__AllowCredentials=false
# Self-hosted defaults: no SaaS billing gate
# Fallback AppUrl
- AppUrl=http://localhost:5200
# Auto-apply migrations on startup for local Docker installs
- AUTO_MIGRATE=true
# Email placeholders to satisfy DI
- EmailConfiguration__From=${SMTP_FROM:-noreply@example.local}
- EmailConfiguration__SmtpServer=${SMTP_HOST:-}
- EmailConfiguration__Port=465
- EmailConfiguration__UserName=${SMTP_USERNAME:-}
- EmailConfiguration__Password=${SMTP_PASSWORD:-}
ports:
- "5100:8080"
webapp:
build:
context: .
dockerfile: src/OpenCashFlow.WebApp/Dockerfile
container_name: opencashflow-dev-webapp
depends_on:
- api
environment:
- ASPNETCORE_ENVIRONMENT=Development
# WebApp talks to API via internal DNS
- Account__API=http://api:8080
# Redirects must be reachable by the browser on host
- Account__Login=http://localhost:5200/Login
- Account__FastLogin=http://localhost:5200/FastLogin
- Account__Logout=http://localhost:5200/Logout
- Account__AppUrl=http://localhost:5200/
- Account__CookieDomain=
- Account__SessionCookieDomain=
# JWT settings (must match API)
- JwtSettings__SecretKey=local-development-secret-key-change-before-production-0001
- JwtSettings__Issuer=http://api:8080
- JwtSettings__Audience=http://webapp:8080
# Email placeholders to satisfy DI
- EmailConfiguration__From=${SMTP_FROM:-noreply@example.local}
- EmailConfiguration__SmtpServer=${SMTP_HOST:-}
- EmailConfiguration__Port=465
- EmailConfiguration__UserName=${SMTP_USERNAME:-}
- EmailConfiguration__Password=${SMTP_PASSWORD:-}
ports:
- "5200:8080"
volumes:
pgdata: