-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (92 loc) · 2.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
96 lines (92 loc) · 2.71 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
94
95
96
services:
focusflow-api:
pull_policy: if_not_present
build:
context: .
dockerfile: src/FocusFlow.WebApi/Dockerfile
ports:
- "8080:8080" # HTTP only - internal service - API doesn't need HTTPS in dev because communicates inside Docker network.
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8080
- "ConnectionStrings:DefaultConnection=${CONNECTION_STRING}"
- "JwtSettings__SecretKey=${JWT_KEY}"
- "JwtSettings__Issuer=${JWT_ISSUER}"
- "JwtSettings__Audience=${JWT_AUDIENCE}"
- TEST_USER_EMAIL=${TEST_USER_EMAIL}
- TEST_USER_PASSWORD=${TEST_USER_PASSWORD}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
depends_on:
postgres-db:
condition: service_healthy
tmpfs:
- /tmp
# no certificate mount for API in dev
focusflow-blazor:
pull_policy: if_not_present
build:
context: .
dockerfile: src/FocusFlow.BlazorApp/Dockerfile
ports:
- "5050:8080" # HTTP
- "5051:8081" # HTTPS
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8080;https://+:8081
- ApiBaseUrl=http://focusflow-api:8080
- "JwtSettings__SecretKey=${JWT_KEY}"
- "JwtSettings__Issuer=${JWT_ISSUER}"
- "JwtSettings__Audience=${JWT_AUDIENCE}"
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=${CERT_PASSWORD}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
depends_on:
focusflow-api:
condition: service_healthy
tmpfs:
- /tmp
volumes:
- ./certs:/https:ro # Mount development certificate
- ./dataprotection:/dataprotection-keys:rw # Persist keys across restarts
postgres-db:
image: postgres:17.2
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# ports removed for production/security
volumes:
- focusflow-db-data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
focusflow-seq:
image: datalust/seq:2024.3
ports:
- "5342:5341"
- "8082:80"
environment:
ACCEPT_EULA: "Y"
deploy:
resources:
limits:
memory: 1g
reservations:
memory: 512m
volumes:
- seq-data:/data
volumes:
focusflow-db-data:
seq-data: