-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (84 loc) · 2.2 KB
/
docker-compose.yml
File metadata and controls
88 lines (84 loc) · 2.2 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
services:
# PostgreSQL Database
postgres:
image: postgres:16
container_name: container-engine-db
environment:
POSTGRES_DB: container_engine
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
networks:
- container-engine-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:7-alpine
container_name: container-engine-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- container-engine-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
# Full-stack Container Engine (Backend + Frontend)
container-engine:
build:
context: .
dockerfile: Dockerfile
args:
# Build in offline mode - no external database needed
DATABASE_URL: ""
container_name: container-engine-app
ports:
- "3000:3000"
environment:
# Use internal services
DATABASE_URL: postgresql://postgres:password@postgres:5432/container_engine
REDIS_URL: redis://redis:6379
# App configuration
PORT: 3000
JWT_SECRET: development-jwt-secret-key-not-for-production
JWT_EXPIRES_IN: 3600
API_KEY_PREFIX: ce_dev_
KUBERNETES_NAMESPACE: container-engine-dev
DOMAIN_SUFFIX: localhost
RUST_LOG: container_engine=debug,tower_http=debug
KUBECONFIG_PATH: /app/k8sConfig.yaml
FRONTEND_PATH: /app/apps/container-engine-frontend/dist
volumes:
- ./k8sConfig.yaml:/app/k8sConfig.yaml:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- container-engine-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
container-engine-network:
driver: bridge