-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.volume-manager.yml
More file actions
119 lines (113 loc) · 3.24 KB
/
docker-compose.volume-manager.yml
File metadata and controls
119 lines (113 loc) · 3.24 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
x-rust-common: &rust-common
build:
context: .
dockerfile: control-plane/Dockerfile.dev.shared
volumes:
- ./control-plane/shared:/app/control-plane/shared
- ./Cargo.toml:/app/Cargo.toml
- ./Cargo.lock:/app/Cargo.lock
- cargo_cache:/usr/local/cargo/registry
- cargo_git:/usr/local/cargo/git
networks:
- csf-network
restart: unless-stopped
services:
postgres:
image: postgres:16-alpine
container_name: csf-postgres-volumes
environment:
POSTGRES_USER: csf_user
POSTGRES_PASSWORD: csf_password
POSTGRES_DB: csf_core
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U csf_user -d csf_core"]
interval: 10s
timeout: 5s
retries: 5
networks:
- csf-network
etcd:
image: gcr.io/etcd-development/etcd:v3.5.21
container_name: csf-etcd-volumes
command:
- etcd
- --advertise-client-urls=http://etcd:2379
- --listen-client-urls=http://0.0.0.0:2379
ports:
- "2379:2379"
networks:
- csf-network
api-gateway:
<<: *rust-common
container_name: csf-api-gateway-volumes
environment:
DATABASE_URL: postgres://csf_user:csf_password@postgres:5432/csf_core
RUST_LOG: debug
JWT_SECRET: ${JWT_SECRET:-dev_jwt_secret_change_in_production}
RSA_KEY_SIZE: "2048"
REGISTRY_SERVICE_URL: http://registry:8001
SCHEDULER_SERVICE_URL: http://scheduler:8002
VOLUME_MANAGER_URL: http://volume-manager:8003
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./control-plane/api-gateway:/app/control-plane/api-gateway
- ./control-plane/shared:/app/control-plane/shared
- ./Cargo.toml:/app/Cargo.toml
- ./Cargo.lock:/app/Cargo.lock
- cargo_cache:/usr/local/cargo/registry
- cargo_git:/usr/local/cargo/git
- cargo_target_api_gateway:/app/target
command: cargo watch -x "run -p api-gateway"
volume-manager:
<<: *rust-common
container_name: csf-volume-manager
environment:
DATABASE_URL: postgres://csf_user:csf_password@postgres:5432/csf_core
ETCD_ENDPOINTS: http://etcd:2379
VOLUME_MANAGER_PORT: "8003"
RUST_LOG: debug
ports:
- "8003:8003"
depends_on:
postgres:
condition: service_healthy
etcd:
condition: service_started
api-gateway:
condition: service_started
volumes:
- ./control-plane/volume-manager:/app/control-plane/volume-manager
- ./control-plane/shared:/app/control-plane/shared
- ./Cargo.toml:/app/Cargo.toml
- ./Cargo.lock:/app/Cargo.lock
- cargo_cache:/usr/local/cargo/registry
- cargo_git:/usr/local/cargo/git
- cargo_target_volume_manager:/app/target
command: cargo watch -x "run -p volume-manager"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
driver: local
cargo_cache:
driver: local
cargo_git:
driver: local
cargo_target_api_gateway:
driver: local
cargo_target_volume_manager:
driver: local
networks:
csf-network:
driver: bridge