-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (83 loc) · 2.07 KB
/
docker-compose.yml
File metadata and controls
88 lines (83 loc) · 2.07 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
# Docker Compose Configuration for FoamAI CFD Assistant
# Manages three containerized services: API, OpenFOAM solver, and ParaView server
# Updated to use GitHub Container Registry (ghcr.io) for reliable image hosting
version: '3.8'
services:
# FastAPI Backend Service
api:
image: ${GHCR_API_URL:-ghcr.io/bbaserdem/foamai/api}:latest
container_name: foamai-api
ports:
- "8000:8000"
volumes:
- simulation_data:/data
environment:
- PYTHONUNBUFFERED=1
- TZ=UTC
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- foamai-network
# OpenFOAM CFD Solver Service
openfoam:
image: ${GHCR_OPENFOAM_URL:-ghcr.io/bbaserdem/foamai/openfoam}:latest
container_name: foamai-openfoam
volumes:
- simulation_data:/data
environment:
- FOAM_SETTINGS=/opt/openfoam/etc/bashrc
- TZ=UTC
restart: unless-stopped
depends_on:
- api
healthcheck:
test: ["CMD", "test", "-f", "/opt/openfoam/etc/bashrc"]
interval: 60s
timeout: 30s
retries: 3
start_period: 120s
networks:
- foamai-network
# ParaView Server for Remote Visualization
pvserver:
image: ${GHCR_PVSERVER_URL:-ghcr.io/bbaserdem/foamai/pvserver}:latest
container_name: foamai-pvserver
ports:
- "11111:11111"
volumes:
- simulation_data:/data
environment:
- DISPLAY=:0
- TZ=UTC
restart: unless-stopped
depends_on:
- openfoam
healthcheck:
test: ["CMD", "pgrep", "pvserver"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
- foamai-network
# Shared volumes for simulation data
volumes:
simulation_data:
driver: local
driver_opts:
type: none
o: bind
device: /data
# Custom network for service communication
networks:
foamai-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/16