2025-01-23 17:54:00 +07:00
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: mariadb:11.6.2
|
|
|
|
|
environment:
|
|
|
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
|
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
|
|
|
MYSQL_USER: ${MYSQL_USER}
|
|
|
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
2025-01-23 18:38:32 +07:00
|
|
|
networks:
|
|
|
|
|
db:
|
2025-01-23 18:46:34 +07:00
|
|
|
ipv4_address: 10.10.2.2
|
|
|
|
|
hostname: wordpress_db
|
2025-01-23 17:54:00 +07:00
|
|
|
volumes:
|
|
|
|
|
- db_data:/var/lib/mysql
|
|
|
|
|
|
|
|
|
|
wordpress:
|
|
|
|
|
image: wordpress:6.7.1-php8.3-fpm-alpine
|
2025-01-23 18:38:32 +07:00
|
|
|
networks:
|
2025-01-23 18:46:34 +07:00
|
|
|
wp:
|
|
|
|
|
db:
|
|
|
|
|
ipv4_address: 10.10.2.3
|
2025-01-23 17:54:00 +07:00
|
|
|
volumes:
|
|
|
|
|
- wordpress_data:/var/www/html
|
2025-01-23 21:16:57 +07:00
|
|
|
extends:
|
|
|
|
|
service: db
|
2025-01-23 17:54:00 +07:00
|
|
|
|
|
|
|
|
apache:
|
|
|
|
|
build:
|
|
|
|
|
context: ../../../.
|
|
|
|
|
dockerfile: manufacturer/container/apache/Dockerfile
|
2025-01-23 19:17:36 +07:00
|
|
|
image: custom-apache:v5.3
|
2025-01-23 18:38:32 +07:00
|
|
|
networks:
|
|
|
|
|
metrics:
|
|
|
|
|
ipv4_address: 10.10.1.2
|
|
|
|
|
wp:
|
2025-01-23 17:54:00 +07:00
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
|
|
|
|
- wordpress_data:/var/www/html
|
|
|
|
|
- ../../configs/apache/apache.conf:/etc/apache2/sites-available/000-default.conf
|
|
|
|
|
depends_on:
|
|
|
|
|
- wordpress
|
|
|
|
|
|
2025-01-23 18:38:32 +07:00
|
|
|
prometheus:
|
|
|
|
|
image: prom/prometheus:v3.1.0
|
|
|
|
|
volumes:
|
|
|
|
|
- ../../configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
|
networks:
|
|
|
|
|
metrics:
|
|
|
|
|
ipv4_address: 10.10.1.3
|
|
|
|
|
ports:
|
|
|
|
|
- "9090:9090"
|
|
|
|
|
|
2025-01-23 20:56:13 +07:00
|
|
|
exporter:
|
|
|
|
|
image: lusotycoon/apache-exporter
|
|
|
|
|
container_name: exporter
|
|
|
|
|
privileged: true
|
|
|
|
|
networks:
|
|
|
|
|
metrics:
|
|
|
|
|
ipv4_address: 10.10.1.5
|
|
|
|
|
ports:
|
|
|
|
|
- mode: ingress
|
|
|
|
|
target: 9117
|
|
|
|
|
published: "9117"
|
|
|
|
|
protocol: tcp
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
entrypoint: /bin/apache_exporter --scrape_uri="http://10.10.1.2/server-status?auto"
|
|
|
|
|
|
2025-01-23 19:17:36 +07:00
|
|
|
grafana:
|
|
|
|
|
image: grafana/grafana:11.4.0
|
|
|
|
|
networks:
|
|
|
|
|
metrics:
|
|
|
|
|
ipv4_address: 10.10.1.4
|
|
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
|
|
|
|
environment:
|
|
|
|
|
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD}
|
|
|
|
|
volumes:
|
|
|
|
|
- grafana_data:/var/lib/grafana
|
2025-01-23 19:39:08 +07:00
|
|
|
- ../../configs/grafana/provisioning:/etc/grafana/provisioning
|
2025-01-23 20:56:13 +07:00
|
|
|
# - ../grafana/import_dashboard.sh:/docker-entrypoint-init.d/import_dashboard.sh
|
|
|
|
|
# entrypoint: [ "/bin/sh", "-c", "chmod +x /docker-entrypoint-init.d/import_dashboard.sh && /docker-entrypoint-init.d/import_dashboard.sh" ]
|
2025-01-23 19:17:36 +07:00
|
|
|
|
2025-01-23 17:54:00 +07:00
|
|
|
volumes:
|
2025-01-23 18:38:32 +07:00
|
|
|
db_data:
|
2025-01-23 19:17:36 +07:00
|
|
|
grafana_data:
|
|
|
|
|
wordpress_data:
|
2025-01-23 18:38:32 +07:00
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
db:
|
|
|
|
|
name: db
|
|
|
|
|
driver: bridge
|
|
|
|
|
external: false
|
2025-01-23 18:46:34 +07:00
|
|
|
ipam:
|
|
|
|
|
config:
|
|
|
|
|
- subnet: 10.10.2.0/24
|
2025-01-23 18:38:32 +07:00
|
|
|
|
|
|
|
|
wp:
|
|
|
|
|
name: wp
|
|
|
|
|
driver: bridge
|
|
|
|
|
external: false
|
|
|
|
|
|
|
|
|
|
metrics:
|
|
|
|
|
name: metrics
|
|
|
|
|
driver: bridge
|
|
|
|
|
external: false
|
|
|
|
|
ipam:
|
|
|
|
|
config:
|
|
|
|
|
- subnet: 10.10.1.0/24
|