statping/dev/docker-compose.full.yml

263 lines
6.2 KiB
YAML
Raw Normal View History

2020-02-28 06:37:48 +00:00
version: '2.3'
2020-02-27 10:07:05 +00:00
2020-05-15 22:04:09 +00:00
###############################################
# 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
#
###############################################
2020-02-29 23:36:31 +00:00
2020-05-15 22:04:09 +00:00
services:
2020-02-28 06:37:48 +00:00
2020-05-15 22:04:09 +00:00
statping_sqlite:
container_name: statping_sqlite
2020-02-27 10:07:05 +00:00
build:
2020-05-15 22:04:09 +00:00
context: ../
2020-02-27 10:07:05 +00:00
restart: on-failure
volumes:
- ./docker/statping/sqlite:/app
environment:
DB_CONN: sqlite
2020-02-28 06:37:48 +00:00
API_SECRET: exampleapisecret
2020-05-15 22:04:09 +00:00
NAME: Statping
DOMAIN: http://localhost:8080
2020-02-28 06:37:48 +00:00
DESCRIPTION: This is a dev environment on SQLite!
ADMIN_USER: admin
ADMIN_PASS: admin
2020-02-27 10:07:05 +00:00
ports:
2020-05-15 22:04:09 +00:00
- 8080:8080
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
- frontend
2020-02-28 06:37:48 +00:00
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
2020-02-29 15:00:08 +00:00
interval: 10s
retries: 20
2020-02-27 10:07:05 +00:00
statping_mysql:
container_name: statping_mysql
build:
2020-05-15 22:04:09 +00:00
context: ../
2020-02-27 10:07:05 +00:00
restart: on-failure
volumes:
- ./docker/statping/mysql:/app
environment:
DB_CONN: mysql
DB_HOST: mysql
DB_USER: root
DB_PASS: password123
2020-05-15 22:04:09 +00:00
DB_DATABASE: statping
DB_PORT: 3306
2020-02-28 06:37:48 +00:00
API_SECRET: exampleapisecret
2020-05-15 22:04:09 +00:00
NAME: Statping MySQL
DOMAIN: http://localhost:8080
2020-02-28 06:37:48 +00:00
DESCRIPTION: This is a dev environment on MySQL!
ADMIN_USER: admin
ADMIN_PASS: admin
2020-05-15 22:04:09 +00:00
ports:
- 8081:8080
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
- frontend
2020-02-28 06:37:48 +00:00
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
2020-02-29 15:00:08 +00:00
interval: 10s
retries: 20
2020-05-15 22:04:09 +00:00
depends_on:
mysql:
condition: service_healthy
2020-02-27 10:07:05 +00:00
statping_postgres:
container_name: statping_postgres
build:
2020-05-15 22:04:09 +00:00
context: ../
2020-02-27 10:07:05 +00:00
restart: on-failure
volumes:
2020-05-15 22:04:09 +00:00
- ./docker/statping/mysql:/app
2020-02-27 10:07:05 +00:00
environment:
DB_CONN: postgres
DB_HOST: postgres
DB_USER: root
DB_PASS: password123
2020-05-15 22:04:09 +00:00
DB_DATABASE: statping
DB_PORT: 5432
2020-02-28 06:37:48 +00:00
API_SECRET: exampleapisecret
2020-05-15 22:04:09 +00:00
NAME: Statping Postgres
DOMAIN: http://localhost:8080
2020-02-28 06:37:48 +00:00
DESCRIPTION: This is a dev environment on Postgres!
ADMIN_USER: admin
ADMIN_PASS: admin
2020-05-15 22:04:09 +00:00
ports:
- 8082:8080
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
- frontend
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
timeout: 2s
interval: 10s
retries: 20
2020-02-28 06:37:48 +00:00
depends_on:
postgres:
condition: service_healthy
2020-05-15 22:04:09 +00:00
statping_mariadb:
container_name: statping_mariadb
build:
context: ../
restart: on-failure
volumes:
- ./docker/statping/mariadb:/app
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:8080
DESCRIPTION: This is a dev environment on MariaDB!
ADMIN_USER: admin
ADMIN_PASS: admin
ports:
- 8083:8080
networks:
- database
- frontend
2020-02-28 06:37:48 +00:00
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
2020-05-15 22:04:09 +00:00
timeout: 2s
interval: 10s
retries: 20
depends_on:
mariadb:
condition: service_healthy
2020-02-27 10:07:05 +00:00
postgres:
container_name: postgres
2020-02-28 06:37:48 +00:00
image: postgres
2020-02-27 10:07:05 +00:00
volumes:
2020-02-28 06:37:48 +00:00
- ./docker/databases/postgres:/var/lib/postgresql/data
2020-05-15 22:04:09 +00:00
ports:
- 5432:5432
2020-02-27 10:07:05 +00:00
environment:
POSTGRES_PASSWORD: password123
POSTGRES_DB: statping
POSTGRES_USER: root
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
2020-02-28 06:37:48 +00:00
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root"]
interval: 15s
2020-02-29 15:00:08 +00:00
timeout: 10s
retries: 20
2020-02-27 10:07:05 +00:00
mysql:
container_name: mysql
image: mysql:5.7
volumes:
- ./docker/databases/mysql:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password123
MYSQL_DATABASE: statping
MYSQL_USER: root
2020-05-15 22:04:09 +00:00
MYSQL_PASSWORD: password123
ports:
- 3306:3306
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
2020-02-28 06:37:48 +00:00
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
interval: 15s
2020-02-29 15:00:08 +00:00
retries: 30
2020-02-27 10:07:05 +00:00
2020-05-15 22:04:09 +00:00
mariadb:
container_name: mariadb
image: mariadb
volumes:
- ./docker/databases/mariadb:/var/lib/mysql
restart: always
2020-02-27 10:07:05 +00:00
environment:
2020-02-28 06:37:48 +00:00
MYSQL_ROOT_PASSWORD: password123
2020-05-15 22:04:09 +00:00
MYSQL_DATABASE: statping
MYSQL_USER: root
MYSQL_PASSWORD: password123
2020-02-28 06:37:48 +00:00
ports:
2020-05-15 22:04:09 +00:00
- 3307:3306
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
interval: 15s
retries: 30
2020-02-28 06:37:48 +00:00
2020-05-15 22:04:09 +00:00
adminer:
container_name: adminer
image: adminer
restart: always
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
- database
- frontend
ports:
- 8282:8080
2020-02-27 10:07:05 +00:00
prometheus:
container_name: prometheus
image: prom/prometheus:v2.0.0
restart: on-failure
volumes:
2020-05-15 22:04:09 +00:00
- ./prometheus.yml:/etc/prometheus/prometheus.yml
2020-02-27 10:07:05 +00:00
- ./docker/databases/prometheus:/prometheus
2020-02-28 06:37:48 +00:00
ports:
- 7050:9090
networks:
2020-05-15 22:04:09 +00:00
- database
2020-02-28 06:37:48 +00:00
healthcheck:
test: "/bin/wget -q -Y off http://localhost:9090/status -O /dev/null > /dev/null 2>&1"
interval: 10s
timeout: 3s
2020-02-27 10:07:05 +00:00
grafana:
container_name: grafana
image: grafana/grafana
restart: on-failure
ports:
- 3000:3000
volumes:
- ./docker/grafana:/var/lib/grafana
2020-05-15 22:04:09 +00:00
- ./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml
- ./grafana/statping_dashboard.json:/etc/grafana/provisioning/dashboards/statping_dashboard.json
2020-02-27 10:07:05 +00:00
environment:
- GF_USERS_ALLOW_SIGN_UP=false
2020-02-28 06:37:48 +00:00
- GF_AUTH_ANONYMOUS_ENABLED=true
2020-02-27 10:07:05 +00:00
depends_on:
2020-02-28 06:37:48 +00:00
prometheus:
condition: service_healthy
networks:
2020-05-15 22:04:09 +00:00
- frontend
- database
2020-02-28 06:37:48 +00:00
healthcheck:
test: "/usr/bin/wget -q -Y off http://localhost:3000/api/health -O /dev/null > /dev/null 2>&1"
2020-02-29 15:00:08 +00:00
interval: 10s
2020-02-28 06:37:48 +00:00
retries: 20
2020-02-27 10:07:05 +00:00
2020-02-28 06:37:48 +00:00
networks:
2020-05-15 22:04:09 +00:00
frontend:
database: