statping-ng/dev/docker-compose.full.m1.yml

276 lines
6.7 KiB
YAML

version: '2.3'
###############################################
# Statping Full Stack
#
# Statping SQLIte => http://localhost:8080
# Statping MySQL => http://localhost:8081
# Statping Postgres => http://localhost:8082
# Statping MariaDB => http://localhost:8083
#
# Adminer => http://localhost:8282
# Prometheus => http://localhost:7050
# Grafana => http://localhost:3000
#
# MySQL => http://localhost:3306
# Postgres => http://localhost:5432
# MariaDB => http://localhost:3307
#
###############################################
services:
statping_sqlite:
container_name: statping_sqlite
platform: linux/amd64
build:
context: ./
restart: on-failure
volumes:
- ./dev/docker/statping/sqlite:/app
- ./dev/services.yml:/app/services.yml
environment:
DB_CONN: sqlite
API_SECRET: exampleapisecret
NAME: Statping
DOMAIN: http://localhost:8084
DESCRIPTION: This is a dev environment on SQLite!
ADMIN_USER: admin
ADMIN_PASSWORD: admin
SAMPLE_DATA: 'false'
ports:
- 8084:8080
networks:
- database
- frontend
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
interval: 10s
retries: 20
statping_mysql:
container_name: statping_mysql
platform: linux/amd64
build:
context: ./
restart: on-failure
volumes:
- ./dev/docker/statping/mysql:/app
- ./dev/services.yml:/app/services.yml
environment:
DB_CONN: mysql
DB_HOST: mysql
DB_USER: root
DB_PASS: password123
DB_DATABASE: statping
DB_PORT: 3306
API_SECRET: exampleapisecret
NAME: Statping MySQL
DOMAIN: http://localhost:8081
DESCRIPTION: This is a dev environment on MySQL!
ADMIN_USER: admin
ADMIN_PASSWORD: admin
SAMPLE_DATA: 'false'
ports:
- 8081:8080
networks:
- database
- frontend
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
interval: 10s
retries: 20
depends_on:
mysql:
condition: service_healthy
statping_postgres:
container_name: statping_postgres
platform: linux/amd64
build:
context: ./
restart: on-failure
volumes:
- ./dev/docker/statping/mysql:/app
- ./dev/services.yml:/app/services.yml
environment:
DB_CONN: postgres
DB_HOST: postgres
DB_USER: root
DB_PASS: password123
DB_DATABASE: statping
DB_PORT: 5432
API_SECRET: exampleapisecret
NAME: Statping Postgres
DOMAIN: http://localhost:8082
DESCRIPTION: This is a dev environment on Postgres!
ADMIN_USER: admin
ADMIN_PASSWORD: admin
SAMPLE_DATA: 'false'
ports:
- 8082:8080
networks:
- database
- frontend
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
interval: 10s
retries: 20
depends_on:
postgres:
condition: service_healthy
statping_mariadb:
container_name: statping_mariadb
platform: linux/amd64
build:
context: ./
restart: on-failure
volumes:
- ./dev/docker/statping/mariadb:/app
- ./dev/services.yml:/app/services.yml
environment:
DB_CONN: mysql
DB_HOST: mariadb
DB_USER: root
DB_PASS: password123
DB_DATABASE: statping
DB_PORT: 3306
API_SECRET: exampleapisecret
NAME: Statping MariaDB
DOMAIN: http://localhost:8083
DESCRIPTION: This is a dev environment on MariaDB!
ADMIN_USER: admin
ADMIN_PASSWORD: admin
SAMPLE_DATA: 'false'
ports:
- 8083:8080
networks:
- database
- frontend
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
interval: 10s
retries: 20
depends_on:
mariadb:
condition: service_healthy
postgres:
container_name: postgres
image: postgres
volumes:
- ./dev/docker/databases/postgres:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: password123
POSTGRES_DB: statping
POSTGRES_USER: root
networks:
- database
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root"]
interval: 15s
timeout: 10s
retries: 20
mysql:
container_name: mysql
image: mysql:5.7
volumes:
- ./dev/docker/databases/mysql:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password123
MYSQL_DATABASE: statping
ports:
- 3306:3306
networks:
- database
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
interval: 15s
retries: 30
mariadb:
container_name: mariadb
image: mariadb
volumes:
- ./dev/docker/databases/mariadb:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password123
MYSQL_DATABASE: statping
ports:
- 3307:3306
networks:
- database
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
interval: 15s
retries: 30
adminer:
container_name: adminer
image: adminer
restart: always
networks:
- database
- frontend
ports:
- 8282:8080
prometheus:
container_name: prometheus
platform: linux/amd64
image: prom/prometheus:v2.0.0
restart: on-failure
volumes:
- ./dev/prometheus.yml:/etc/prometheus/prometheus.yml
- ./dev/docker/databases/prometheus:/prometheus
ports:
- 7050:9090
networks:
- database
healthcheck:
test: "/bin/wget -q -Y off http://localhost:9090/status -O /dev/null > /dev/null 2>&1"
interval: 10s
timeout: 3s
grafana:
container_name: grafana
image: grafana/grafana
restart: on-failure
ports:
- 3000:3000
volumes:
- ./dev/docker/grafana:/var/lib/grafana
- ./dev/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./dev/grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml
- ./dev/grafana/statping_dashboard.json:/etc/grafana/provisioning/dashboards/statping_dashboard.json
environment:
- GF_USERS_ALLOW_SIGN_UP=false
- GF_AUTH_ANONYMOUS_ENABLED=true
depends_on:
prometheus:
condition: service_healthy
networks:
- frontend
- database
healthcheck:
test: "/usr/bin/wget -q -Y off http://localhost:3000/api/health -O /dev/null > /dev/null 2>&1"
interval: 10s
retries: 20
networks:
frontend:
database: