mirror of https://github.com/statping/statping
including NAME, DESCRIPTION, and DOMAIN env vars to be used when Statping is setup (automatically), modified docker-compose full stack yml.
parent
e654f1cb2f
commit
f9ab560736
|
@ -13,6 +13,10 @@ version: '2.3'
|
||||||
# Prometheus => http://localhost:7050
|
# Prometheus => http://localhost:7050
|
||||||
# Grafana => http://localhost:3000
|
# Grafana => http://localhost:3000
|
||||||
#
|
#
|
||||||
|
# MySQL => http://localhost:3306
|
||||||
|
# Postgres => http://localhost:5432
|
||||||
|
# MariaDB => http://localhost:3307
|
||||||
|
#
|
||||||
###############################################
|
###############################################
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -24,6 +28,7 @@ services:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/statping/sqlite:/app
|
- ./docker/statping/sqlite:/app
|
||||||
|
- ./services.yml:/app/services.yml
|
||||||
environment:
|
environment:
|
||||||
DB_CONN: sqlite
|
DB_CONN: sqlite
|
||||||
API_SECRET: exampleapisecret
|
API_SECRET: exampleapisecret
|
||||||
|
@ -32,6 +37,7 @@ services:
|
||||||
DESCRIPTION: This is a dev environment on SQLite!
|
DESCRIPTION: This is a dev environment on SQLite!
|
||||||
ADMIN_USER: admin
|
ADMIN_USER: admin
|
||||||
ADMIN_PASS: admin
|
ADMIN_PASS: admin
|
||||||
|
SAMPLE_DATA: 'false'
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
networks:
|
networks:
|
||||||
|
@ -50,6 +56,7 @@ services:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/statping/mysql:/app
|
- ./docker/statping/mysql:/app
|
||||||
|
- ./services.yml:/app/services.yml
|
||||||
environment:
|
environment:
|
||||||
DB_CONN: mysql
|
DB_CONN: mysql
|
||||||
DB_HOST: mysql
|
DB_HOST: mysql
|
||||||
|
@ -59,10 +66,11 @@ services:
|
||||||
DB_PORT: 3306
|
DB_PORT: 3306
|
||||||
API_SECRET: exampleapisecret
|
API_SECRET: exampleapisecret
|
||||||
NAME: Statping MySQL
|
NAME: Statping MySQL
|
||||||
DOMAIN: http://localhost:8080
|
DOMAIN: http://localhost:8081
|
||||||
DESCRIPTION: This is a dev environment on MySQL!
|
DESCRIPTION: This is a dev environment on MySQL!
|
||||||
ADMIN_USER: admin
|
ADMIN_USER: admin
|
||||||
ADMIN_PASS: admin
|
ADMIN_PASS: admin
|
||||||
|
SAMPLE_DATA: 'false'
|
||||||
ports:
|
ports:
|
||||||
- 8081:8080
|
- 8081:8080
|
||||||
networks:
|
networks:
|
||||||
|
@ -84,6 +92,7 @@ services:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/statping/mysql:/app
|
- ./docker/statping/mysql:/app
|
||||||
|
- ./services.yml:/app/services.yml
|
||||||
environment:
|
environment:
|
||||||
DB_CONN: postgres
|
DB_CONN: postgres
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
|
@ -93,10 +102,11 @@ services:
|
||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
API_SECRET: exampleapisecret
|
API_SECRET: exampleapisecret
|
||||||
NAME: Statping Postgres
|
NAME: Statping Postgres
|
||||||
DOMAIN: http://localhost:8080
|
DOMAIN: http://localhost:8082
|
||||||
DESCRIPTION: This is a dev environment on Postgres!
|
DESCRIPTION: This is a dev environment on Postgres!
|
||||||
ADMIN_USER: admin
|
ADMIN_USER: admin
|
||||||
ADMIN_PASS: admin
|
ADMIN_PASS: admin
|
||||||
|
SAMPLE_DATA: 'false'
|
||||||
ports:
|
ports:
|
||||||
- 8082:8080
|
- 8082:8080
|
||||||
networks:
|
networks:
|
||||||
|
@ -118,6 +128,7 @@ services:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/statping/mariadb:/app
|
- ./docker/statping/mariadb:/app
|
||||||
|
- ./services.yml:/app/services.yml
|
||||||
environment:
|
environment:
|
||||||
DB_CONN: mysql
|
DB_CONN: mysql
|
||||||
DB_HOST: mariadb
|
DB_HOST: mariadb
|
||||||
|
@ -127,10 +138,11 @@ services:
|
||||||
DB_PORT: 3306
|
DB_PORT: 3306
|
||||||
API_SECRET: exampleapisecret
|
API_SECRET: exampleapisecret
|
||||||
NAME: Statping MariaDB
|
NAME: Statping MariaDB
|
||||||
DOMAIN: http://localhost:8080
|
DOMAIN: http://localhost:8083
|
||||||
DESCRIPTION: This is a dev environment on MariaDB!
|
DESCRIPTION: This is a dev environment on MariaDB!
|
||||||
ADMIN_USER: admin
|
ADMIN_USER: admin
|
||||||
ADMIN_PASS: admin
|
ADMIN_PASS: admin
|
||||||
|
SAMPLE_DATA: 'false'
|
||||||
ports:
|
ports:
|
||||||
- 8083:8080
|
- 8083:8080
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -13,10 +13,10 @@ func Samples() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
core := &Core{
|
core := &Core{
|
||||||
Name: "Statping Sample Data",
|
Name: utils.Params.GetString("NAME"),
|
||||||
Description: "This data is only used to testing",
|
Description: utils.Params.GetString("DESCRIPTION"),
|
||||||
ApiSecret: apiSecret,
|
ApiSecret: apiSecret,
|
||||||
Domain: "http://localhost:8080",
|
Domain: utils.Params.GetString("DOMAIN"),
|
||||||
CreatedAt: utils.Now(),
|
CreatedAt: utils.Now(),
|
||||||
UseCdn: null.NewNullBool(false),
|
UseCdn: null.NewNullBool(false),
|
||||||
Footer: null.NewNullString(""),
|
Footer: null.NewNullString(""),
|
||||||
|
|
|
@ -54,6 +54,9 @@ func setDefaults() {
|
||||||
Params.SetDefault("USE_CDN", false)
|
Params.SetDefault("USE_CDN", false)
|
||||||
Params.SetDefault("ALLOW_REPORTS", false)
|
Params.SetDefault("ALLOW_REPORTS", false)
|
||||||
Params.SetDefault("POSTGRES_SSLMODE", "disable")
|
Params.SetDefault("POSTGRES_SSLMODE", "disable")
|
||||||
|
Params.SetDefault("NAME", "Statping Sample Data")
|
||||||
|
Params.SetDefault("DOMAIN", "http://localhost:8080")
|
||||||
|
Params.SetDefault("DESCRIPTION", "This status page has sample data included")
|
||||||
Params.SetDefault("REMOVE_AFTER", 2160*time.Hour)
|
Params.SetDefault("REMOVE_AFTER", 2160*time.Hour)
|
||||||
Params.SetDefault("CLEANUP_INTERVAL", 1*time.Hour)
|
Params.SetDefault("CLEANUP_INTERVAL", 1*time.Hour)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue