118 lines
2.6 KiB
YAML
118 lines
2.6 KiB
YAML
version: '3.9'
|
|
name: teacinema
|
|
services:
|
|
postgres:
|
|
container_name: teacinema-postgres
|
|
image: postgres:15-alpine
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
ports:
|
|
- "${POSTGRES_PORT}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
|
|
networks:
|
|
- teacinema
|
|
|
|
redis:
|
|
container_name: teacinema-redis
|
|
image: redis:6.2
|
|
command: redis-server --requirepass ${REDIS_PASSWORD}
|
|
ports:
|
|
- "${REDIS_PORT}:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- teacinema
|
|
|
|
rabbitmq:
|
|
container_name: teacinema-rabbitmq
|
|
image: rabbitmq:3-management
|
|
ports:
|
|
- "${RABBITMQ_PORT}:5672"
|
|
- "${RABBITMQ_MANAGEMENT_PORT}:15672"
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
|
|
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
|
|
volumes:
|
|
- rabbitmq_data:/var/lib/rabbitmq
|
|
networks:
|
|
- teacinema
|
|
|
|
postgres-exporter:
|
|
container_name: postgres-exporter
|
|
image: 'prometheuscommunity/postgres-exporter'
|
|
environment:
|
|
DATA_SOURCE_NAME: 'postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=disable'
|
|
ports:
|
|
- "9187:9187"
|
|
networks:
|
|
- teacinema
|
|
depends_on:
|
|
- postgres
|
|
|
|
redis-exporter:
|
|
container_name: redis-exporter
|
|
image: 'oliver006/redis_exporter'
|
|
command: -redis.addr=redis//:${REDIS_PASSWORD}@redis:6379
|
|
ports:
|
|
- "9121:9121"
|
|
networks:
|
|
- teacinema
|
|
depends_on:
|
|
- redis
|
|
|
|
rabbitmq-exporter:
|
|
container_name: rabbitmq-exporter
|
|
image: 'kbudde/rabbitmq-exporter'
|
|
environment:
|
|
RABBIT_URL: 'http://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:15672'
|
|
ports:
|
|
- "9419:9419"
|
|
networks:
|
|
- teacinema
|
|
depends_on:
|
|
- rabbitmq
|
|
|
|
node-exporter:
|
|
container_name: node-exporter
|
|
image: 'prom/node-exporter'
|
|
ports:
|
|
- "9100:9100"
|
|
networks:
|
|
- teacinema
|
|
|
|
prometheus:
|
|
container_name: prometheus
|
|
image: 'prom/prometheus:latest'
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
ports:
|
|
- "9090:9090"
|
|
networks:
|
|
- teacinema
|
|
|
|
grafana:
|
|
container_name: grafana
|
|
image: grafana/grafana:10.2.3
|
|
depends_on:
|
|
- prometheus
|
|
ports:
|
|
- "3002:3000"
|
|
volumes:
|
|
- grafana-storage:/var/lib/grafana
|
|
networks:
|
|
- teacinema
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
rabbitmq_data:
|
|
grafana-storage:
|
|
|
|
networks:
|
|
teacinema:
|
|
external: true
|