-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
92 lines (85 loc) · 2.16 KB
/
docker-compose.yaml
File metadata and controls
92 lines (85 loc) · 2.16 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
# Apache TacticalMesh - Docker Compose Configuration
# SPDX-License-Identifier: Apache-2.0
#
# This file defines the full stack for local development and testing.
# For production deployments, see the Kubernetes manifests in deploy/kubernetes/
version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:15-alpine
container_name: tacticalmesh-db
environment:
POSTGRES_USER: tacticalmesh
POSTGRES_PASSWORD: tacticalmesh
POSTGRES_DB: tacticalmesh
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tacticalmesh"]
interval: 5s
timeout: 5s
retries: 5
networks:
- tacticalmesh
# Redis Cache (optional)
redis:
image: redis:7-alpine
container_name: tacticalmesh-redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
networks:
- tacticalmesh
# Mesh Controller Backend
controller:
build:
context: ./backend
dockerfile: Dockerfile
container_name: tacticalmesh-controller
environment:
TM_DATABASE_URL: postgresql+asyncpg://tacticalmesh:tacticalmesh@db:5432/tacticalmesh
TM_REDIS_URL: redis://redis:6379/0
TM_JWT_SECRET_KEY: change-me-in-production-use-strong-secret
TM_DEBUG: "false"
TM_LOG_LEVEL: INFO
TM_CORS_ORIGINS: '["http://localhost:3000","http://localhost:5173"]'
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tacticalmesh
# Web Console Frontend
console:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: tacticalmesh-console
environment:
VITE_API_URL: http://localhost:8000/api/v1
ports:
- "3000:80"
depends_on:
- controller
networks:
- tacticalmesh
volumes:
postgres_data:
networks:
tacticalmesh:
driver: bridge