Refactor code structure for improved readability and maintainability

This commit is contained in:
jhartworks
2026-09-16 12:41:24 +02:00
parent bfce688f6a
commit 4d8b07fc68
22 changed files with 2670 additions and 96 deletions
+28 -10
View File
@@ -24,14 +24,14 @@ services:
image: redis:7.4-alpine
container_name: seltd-redis
restart: unless-stopped
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
ports:
- "6379:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:?Set REDIS_PASSWORD in .env}
command: ["sh", "-c", "exec redis-server /usr/local/etc/redis/redis.conf --requirepass \"$$REDIS_PASSWORD\""]
volumes:
- redis_data:/data
- ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro
healthcheck:
test: ["CMD", "redis-cli", "ping"]
test: ["CMD-SHELL", "redis-cli -a \"$$REDIS_PASSWORD\" ping | grep -q PONG"]
interval: 10s
timeout: 5s
retries: 10
@@ -49,7 +49,7 @@ services:
DB_USER: root
DB_PASSWORD: ${MARIADB_ROOT_PASSWORD:-SE3112}
DB_PASSWORD_FALLBACK: ${DB_PASSWORD_FALLBACK:-root}
REDIS_URL: redis://redis:6379
REDIS_URL: redis://:${REDIS_PASSWORD:?Set REDIS_PASSWORD in .env}@redis:6379/0
JWT_SECRET: ${JWT_SECRET:-change-me}
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@example.com}
@@ -63,6 +63,11 @@ services:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/api/health > /dev/null || exit 1"]
interval: 15s
timeout: 5s
retries: 5
web:
build:
@@ -74,7 +79,13 @@ services:
ports:
- "5173:5173"
depends_on:
- api
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:5173/ > /dev/null || exit 1"]
interval: 15s
timeout: 5s
retries: 5
collector:
build:
@@ -101,6 +112,11 @@ services:
condition: service_healthy
bacnet-collector:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:18110/health > /dev/null || exit 1"]
interval: 15s
timeout: 5s
retries: 5
symcon-collector:
build:
@@ -136,6 +152,11 @@ services:
BACNET_BROADCAST_FALLBACKS: ${BACNET_BROADCAST_FALLBACKS:-}
BACNET_UNICAST_DELAY_MS: ${BACNET_UNICAST_DELAY_MS:-120}
network_mode: "host"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:18111/health > /dev/null || exit 1"]
interval: 15s
timeout: 5s
retries: 5
runner:
build:
@@ -143,7 +164,7 @@ services:
container_name: seltd-runner
restart: unless-stopped
environment:
REDIS_URL: redis://redis:6379
REDIS_URL: redis://:${REDIS_PASSWORD:?Set REDIS_PASSWORD in .env}@redis:6379/0
DB_HOST: mariadb
DB_PORT: 3306
DB_NAME: wago
@@ -197,6 +218,3 @@ volumes: