Pizdec
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: todo-postgres
|
||||
environment:
|
||||
POSTGRES_DB: tododb
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: todo-app
|
||||
environment:
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_NAME: tododb
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: todo-prometheus
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus-data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
ports:
|
||||
- "9090:9090"
|
||||
depends_on:
|
||||
- app
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: todo-grafana
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
- ./grafana-datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
|
||||
- ./grafana-dashboard-provider.yml:/etc/grafana/provisioning/dashboards/provider.yml
|
||||
- ./grafana-dashboard-app.json:/etc/grafana/provisioning/dashboards/app.json
|
||||
- ./grafana-dashboard-db.json:/etc/grafana/provisioning/dashboards/db.json
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
prometheus-data:
|
||||
grafana-data:
|
||||
Reference in New Issue
Block a user