refactoring: Env-Dateien und Docker-Dateien
This commit is contained in:
+57
-3
@@ -16,12 +16,13 @@ services:
|
|||||||
- postgres-data:/var/lib/postgresql/data
|
- postgres-data:/var/lib/postgresql/data
|
||||||
# Falls du Init-Scripte hast, lassen wir die erstmal weg,
|
# Falls du Init-Scripte hast, lassen wir die erstmal weg,
|
||||||
# um Fehlerquellen zu reduzieren, oder lassen den Pfad, falls er existiert:
|
# um Fehlerquellen zu reduzieren, oder lassen den Pfad, falls er existiert:
|
||||||
- ./docker/core/postgres:/docker-entrypoint-initdb.d
|
- ./docker/core/postgres:/docker-entrypoint-initdb.d:Z
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "pg_isready -U pg-user -d meldestelle" ]
|
test: [ "CMD-SHELL", "pg_isready -U pg-user -d meldestelle" ]
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
networks:
|
networks:
|
||||||
- meldestelle-network
|
- meldestelle-network
|
||||||
|
|
||||||
@@ -37,6 +38,12 @@ services:
|
|||||||
PGADMIN_DEFAULT_PASSWORD: strong-password
|
PGADMIN_DEFAULT_PASSWORD: strong-password
|
||||||
volumes:
|
volumes:
|
||||||
- pgadmin-data:/var/lib/pgadmin
|
- pgadmin-data:/var/lib/pgadmin
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD-SHELL", "wget --spider -q http://localhost:80/ || exit 1" ]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
networks:
|
networks:
|
||||||
- meldestelle-network
|
- meldestelle-network
|
||||||
|
|
||||||
@@ -79,13 +86,58 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/core/keycloak:/opt/keycloak/data/import
|
- ./docker/core/keycloak:/opt/keycloak/data/import:Z
|
||||||
command: start-dev --import-realm
|
command: start-dev --import-realm
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "kcadm.sh config credentials --server http://localhost:8080 --realm master --user admin --password admin" ] #"kcadm.sh config credentials --server http://localhost:8080 --realm master --user admin --password admin || exit 1"
|
test: [ "CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000" ]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
networks:
|
||||||
|
- meldestelle-network
|
||||||
|
|
||||||
|
# --- MONITORING ---
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:v2.54.1
|
||||||
|
container_name: meldestelle-prometheus
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "9090:9090"
|
||||||
|
volumes:
|
||||||
|
- prometheus-data:/prometheus
|
||||||
|
- ./docker/monitoring/prometheus:/etc/prometheus:Z
|
||||||
|
command:
|
||||||
|
- --config.file=/etc/prometheus/prometheus.yml
|
||||||
|
- --storage.tsdb.retention.time=15d
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:9090/-/healthy" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
|
networks:
|
||||||
|
- meldestelle-network
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana:11.3.0
|
||||||
|
container_name: meldestelle-grafana
|
||||||
|
environment:
|
||||||
|
GF_SECURITY_ADMIN_USER: gf-admin
|
||||||
|
GF_SECURITY_ADMIN_PASSWORD: gf-password
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- grafana-data:/var/lib/grafana
|
||||||
|
- ./docker/monitoring/grafana:/etc/grafana/provisioning:Z
|
||||||
|
depends_on:
|
||||||
|
- prometheus
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
networks:
|
networks:
|
||||||
- meldestelle-network
|
- meldestelle-network
|
||||||
|
|
||||||
@@ -93,6 +145,8 @@ volumes:
|
|||||||
postgres-data:
|
postgres-data:
|
||||||
pgadmin-data:
|
pgadmin-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
|
prometheus-data:
|
||||||
|
grafana-data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
meldestelle-network:
|
meldestelle-network:
|
||||||
|
|||||||
Reference in New Issue
Block a user