-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
154 lines (149 loc) · 4.16 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
154 lines (149 loc) · 4.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: torvix
services:
postgres:
image: timescale/timescaledb:2.26.4-pg18
container_name: torvix-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-torvix}
POSTGRES_USER: ${POSTGRES_USER:-torvix}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-torvix}
volumes:
- postgres_data:/var/lib/postgresql
network_mode: host
restart: unless-stopped
mem_limit: 1g
cpus: "1.0"
deploy:
resources:
limits:
cpus: "1.0"
memory: 1G
reservations:
cpus: "0.25"
memory: 256M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-torvix} -d $${POSTGRES_DB:-torvix}"]
interval: 10s
timeout: 5s
retries: 10
torvix:
build:
context: .
dockerfile: Dockerfile
container_name: torvix
depends_on:
postgres:
condition: service_healthy
network_mode: host
restart: unless-stopped
mem_limit: 512m
cpus: "1.0"
env_file:
- path: ./.env
required: false
environment:
- TORVIX_HTTP_ADDRESS
- TORVIX_HTTP_PORT
- TORVIX_API_PORT
- TORVIX_API_BEARER_TOKEN
- TORVIX_LOG_LEVEL
- TORVIX_LOG_DIR
- TORVIX_LOG_RETENTION_DAYS
- TORVIX_LOG_STDOUT
- TORVIX_REPORT_TIMEZONE
- TORVIX_DAILY_REPORT_CRON
- TORVIX_WEEKLY_REPORT_CRON
- TORVIX_REPORT_REQUIRE_COMPLETE_INGESTION
- TORVIX_DAILY_REPORT_TARGET_LAG_DAYS
- TORVIX_AWS_ENABLED
- TORVIX_AWS_INGESTION_MODE
- AWS_REGION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- TORVIX_AWS_CUR_BUCKET
- TORVIX_AWS_CUR_PREFIX
- TORVIX_AWS_CUR_REGION
- TORVIX_AWS_CUR_FORMAT
- TORVIX_AWS_CUR_LOOKBACK_DAYS
- TORVIX_AWS_CUR_REPORT_LAG_DAYS
- TORVIX_AWS_CUR_LOCAL_PATH
- TORVIX_AWS_COST_METRIC
- TORVIX_AWS_LOOKBACK_DAYS
- TORVIX_AWS_REPORT_LAG_DAYS
- TORVIX_WASTE_DETECTION_ENABLED
- TORVIX_WASTE_PROVIDER
- TORVIX_WASTE_SCAN_INTERVAL_HOURS
- TORVIX_WASTE_MIN_RESOURCE_AGE_DAYS
- TORVIX_WASTE_STOPPED_INSTANCE_MIN_DAYS
- TORVIX_WASTE_OLD_BACKUP_DAYS
- TORVIX_WASTE_MIN_COST_THRESHOLD
- TORVIX_WASTE_HIGH_MONTHLY_THRESHOLD
- TORVIX_WASTE_CURRENCY
- TORVIX_WASTE_ENABLE_TAG_EXCLUSIONS
- TORVIX_WASTE_EXCLUSION_TAG_KEYS
- TORVIX_AI_ENABLED
- TORVIX_AI_PROVIDER
- TORVIX_AI_MODEL
- OPENAI_API_KEY
- OPENAI_BASE_URL
- TORVIX_AI_TIMEOUT
- TORVIX_AI_MAX_ITEMS_PER_RUN
- TORVIX_AI_QUEUE_SIZE
- TORVIX_AI_INCLUDE_IDENTIFIERS
volumes:
- ./configs:/app/configs:ro
- ./logs:/app/logs
command: ["-config", "/app/configs/config.yaml"]
healthcheck:
test: ["CMD-SHELL", "port=$${TORVIX_HTTP_PORT:-$${TORVIX_API_PORT:-}}; addr=$${TORVIX_HTTP_ADDRESS:-}; if [ -z \"$$port\" ] && [ -n \"$$addr\" ]; then port=$${addr##*:}; fi; wget -qO- http://127.0.0.1:$${port:-8080}/healthz >/dev/null"]
interval: 30s
timeout: 5s
retries: 5
start_period: ${TORVIX_HEALTH_START_PERIOD:-120s}
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
prometheus:
image: prom/prometheus:v3.5.0
container_name: torvix-prometheus
volumes:
- ./deploy/prometheus.yml:/etc/prometheus/prometheus.yml:ro
network_mode: host
restart: unless-stopped
mem_limit: 512m
cpus: "0.5"
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
reservations:
cpus: "0.2"
memory: 64M
grafana:
image: grafana/grafana:13.0.1
container_name: torvix-grafana
network_mode: host
restart: unless-stopped
mem_limit: 512m
cpus: "0.5"
environment:
GF_PLUGINS_PREINSTALL_SYNC: "yesoreyeram-infinity-datasource"
volumes:
- ./docker/grafana/provisioning:/etc/grafana/provisioning:ro
- ./dashboards:/var/lib/grafana/dashboards:ro
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
reservations:
cpus: "0.2"
memory: 64M
volumes:
postgres_data: