statping/dev/docker-compose.full.yml

306 lines
7.4 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
services:
2020-02-29 23:36:31 +00:00
nginx-proxy:
image: jwilder/nginx-proxy
2020-02-28 06:37:48 +00:00
ports:
2020-02-29 23:36:31 +00:00
- 80:80
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- statping
2020-02-29 23:36:31 +00:00
# statping_dev:
# container_name: statping_dev
# build:
# context: .
# dockerfile: ./dev/Dockerfile.dev
# args:
# VERSION: DEV
# COMMIT: DEV
# restart: on-failure
# volumes:
# - ./:/go/src/github.com/hunterlong/statping
# environment:
# VIRTUAL_HOST: local.statping.com
# VIRTUAL_PORT: 8888
# GO_ENV: test
# DB_CONN: sqlite
# API_KEY: exampleapikey
# API_SECRET: exampleapisecret
# NAME: Statping on SQLite
# DOMAIN: http://localhost:4000
# DESCRIPTION: This is a dev environment on SQLite!
# ADMIN_USER: admin
# ADMIN_PASS: admin
# PORT: 8585
# SERVICES: '[{"name": "Local Statping", "type": "http", "domain": "http://localhost:8585", "interval": 30}]'
# ports:
# - 8888:8888
# - 8585:8585
# networks:
# - statping
# healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:8585/health || false"]
# timeout: 2s
# interval: 20s
# retries: 30
2020-02-28 06:37:48 +00:00
2020-02-27 10:07:05 +00:00
statping:
container_name: statping
build:
context: ./
restart: on-failure
volumes:
- ./docker/statping/sqlite:/app
environment:
2020-02-29 23:36:31 +00:00
SERVICES: '[{"name": "Local Statping", "type": "http", "domain": "http://localhost:8585", "interval": 30}]'
VIRTUAL_HOST: sqlite.dev.statping.com
VIRTUAL_PORT: 8080
2020-02-27 10:07:05 +00:00
DB_CONN: sqlite
2020-02-28 06:37:48 +00:00
API_KEY: exampleapikey
API_SECRET: exampleapisecret
NAME: Statping on SQLite
DOMAIN: http://localhost:4000
DESCRIPTION: This is a dev environment on SQLite!
ADMIN_USER: admin
ADMIN_PASS: admin
2020-02-27 10:07:05 +00:00
ports:
2020-02-28 06:37:48 +00:00
- 4000:8080
networks:
- statping
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:
context: ./
restart: on-failure
ports:
2020-02-28 06:37:48 +00:00
- 4005:8080
2020-02-27 10:07:05 +00:00
volumes:
- ./docker/statping/mysql:/app
links:
- mysql
environment:
2020-02-29 23:36:31 +00:00
VIRTUAL_HOST: mysql.dev.statping.com
VIRTUAL_PORT: 8080
2020-02-27 10:07:05 +00:00
DB_CONN: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: statping
DB_USER: root
DB_PASS: password123
2020-02-28 06:37:48 +00:00
API_KEY: exampleapikey
API_SECRET: exampleapisecret
NAME: Statping on MySQL
DOMAIN: http://localhost:4005
DESCRIPTION: This is a dev environment on MySQL!
ADMIN_USER: admin
ADMIN_PASS: admin
networks:
- statping
depends_on:
mysql:
condition: service_healthy
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_postgres:
container_name: statping_postgres
build:
context: ./
restart: on-failure
ports:
2020-02-28 06:37:48 +00:00
- 4010:8080
2020-02-27 10:07:05 +00:00
volumes:
- ./docker/statping/postgres:/app
links:
- postgres
environment:
2020-02-29 23:36:31 +00:00
VIRTUAL_HOST: postgres.dev.statping.com
VIRTUAL_PORT: 8080
2020-02-27 10:07:05 +00:00
DB_CONN: postgres
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: statping
DB_USER: root
DB_PASS: password123
2020-02-28 06:37:48 +00:00
API_KEY: exampleapikey
API_SECRET: exampleapisecret
NAME: Statping on Postgres
DOMAIN: http://localhost:4010
DESCRIPTION: This is a dev environment on Postgres!
ADMIN_USER: admin
ADMIN_PASS: admin
networks:
- statping
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || false"]
2020-02-29 15:00:08 +00:00
timeout: 5s
2020-02-28 06:37:48 +00:00
interval: 5s
2020-02-29 15:00:08 +00:00
retries: 30
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-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:
- statping
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
MYSQL_PASSWORD: password
2020-02-28 06:37:48 +00:00
networks:
- statping
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
phpmyadmin:
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin
restart: on-failure
depends_on:
2020-02-28 06:37:48 +00:00
mysql:
condition: service_healthy
2020-02-27 10:07:05 +00:00
ports:
2020-02-28 06:37:48 +00:00
- 5050:80
2020-02-27 10:07:05 +00:00
links:
- mysql:db
environment:
2020-02-29 23:36:31 +00:00
VIRTUAL_HOST: phpmyadmin.statping.com
VIRTUAL_PORT: 80
2020-02-28 06:37:48 +00:00
MYSQL_ROOT_PASSWORD: password123
2020-02-27 10:07:05 +00:00
PMA_HOST: mysql
PMA_USER: root
PMA_PASSWORD: password123
PMA_PORT: 3306
2020-02-28 06:37:48 +00:00
networks:
- statping
sqlite-web:
container_name: sqlite-web
image: coleifer/sqlite-web
restart: on-failure
command: sqlite_web -H 0.0.0.0 -r -x /data/statping.db
depends_on:
statping:
condition: service_healthy
ports:
- 6050:8080
links:
- statping
volumes:
- ./docker/statping/sqlite/statping.db:/data/statping.db:ro
environment:
2020-02-29 23:36:31 +00:00
VIRTUAL_HOST: sqladmin.statping.com
VIRTUAL_PORT: 8080
2020-02-28 06:37:48 +00:00
SQLITE_DATABASE: /data/statping.db
networks:
- statping
pgadmin4:
container_name: pgadmin4
image: fenglc/pgadmin4
restart: on-failure
environment:
2020-02-29 23:36:31 +00:00
VIRTUAL_HOST: pgadmin.statping.com
VIRTUAL_PORT: 5050
2020-02-28 06:37:48 +00:00
DEFAULT_USER: admin@admin.com
DEFAULT_PASSWORD: admin
depends_on:
postgres:
condition: service_healthy
ports:
- 7000:5050
links:
- postgres:postgres
networks:
- statping
2020-02-27 10:07:05 +00:00
prometheus:
container_name: prometheus
image: prom/prometheus:v2.0.0
restart: on-failure
volumes:
- ./dev/prometheus.yml:/etc/prometheus/prometheus.yml
- ./docker/databases/prometheus:/prometheus
links:
- statping
- statping_mysql
- statping_postgres
2020-02-28 06:37:48 +00:00
ports:
- 7050:9090
networks:
2020-02-27 10:07:05 +00:00
- statping
2020-02-29 23:36:31 +00:00
environment:
VIRTUAL_HOST: prometheus.statping.com
VIRTUAL_PORT: 9090
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-02-28 06:37:48 +00:00
- ./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
2020-02-27 10:07:05 +00:00
environment:
2020-02-29 23:36:31 +00:00
- VIRTUAL_HOST=grafana.statping.com
- VIRTUAL_PORT=3000
2020-02-27 10:07:05 +00:00
- 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
2020-02-27 10:07:05 +00:00
links:
- prometheus
2020-02-28 06:37:48 +00:00
networks:
- statping
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:
statping: