mirror of https://github.com/statping/statping
parent
2b9f701849
commit
721b4ca96b
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION=0.68
|
||||
VERSION=0.69
|
||||
BINARY_NAME=statup
|
||||
GOPATH:=$(GOPATH)
|
||||
GOCMD=go
|
||||
|
|
|
@ -59,7 +59,6 @@ func main() {
|
|||
source.Assets()
|
||||
utils.InitLogs()
|
||||
args := flag.Args()
|
||||
defer core.CloseDB()
|
||||
|
||||
if len(args) >= 1 {
|
||||
err := CatchCLI(args)
|
||||
|
@ -79,6 +78,7 @@ func main() {
|
|||
fmt.Println(handlers.RunHTTPServer(ipAddress, port))
|
||||
os.Exit(1)
|
||||
}
|
||||
defer core.CloseDB()
|
||||
mainProcess()
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ func LoadUsingEnv() (*DbConfig, error) {
|
|||
Configs.DbHost = os.Getenv("DB_HOST")
|
||||
Configs.DbPort = int(utils.StringInt(os.Getenv("DB_PORT")))
|
||||
Configs.DbUser = os.Getenv("DB_USER")
|
||||
Configs.Password = os.Getenv("DB_PASS")
|
||||
Configs.DbPass = os.Getenv("DB_PASS")
|
||||
Configs.DbData = os.Getenv("DB_DATABASE")
|
||||
CoreApp.DbConnection = os.Getenv("DB_CONN")
|
||||
CoreApp.Name = os.Getenv("NAME")
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
version: '2.3'
|
||||
|
||||
services:
|
||||
|
||||
statup:
|
||||
container_name: statup
|
||||
image: hunterlong/statup:latest
|
||||
restart: always
|
||||
networks:
|
||||
- internet
|
||||
- database
|
||||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- ./statup:/app
|
||||
environment:
|
||||
VIRTUAL_HOST: localhost
|
||||
VIRTUAL_PORT: 8080
|
||||
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
||||
DB_CONN: postgres
|
||||
DB_HOST: postgres
|
||||
DB_USER: statup
|
||||
DB_PASS: password123
|
||||
DB_DATABASE: statup
|
||||
NAME: EC2 Example
|
||||
DESCRIPTION: This is a Statup Docker Compose instance
|
||||
|
||||
nginx:
|
||||
container_name: nginx
|
||||
image: jwilder/nginx-proxy
|
||||
ports:
|
||||
- 0.0.0.0:80:80
|
||||
- 0.0.0.0:443:443
|
||||
networks:
|
||||
- internet
|
||||
restart: always
|
||||
labels:
|
||||
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./nginx/certs:/etc/nginx/certs:ro
|
||||
- ./nginx/vhost:/etc/nginx/vhost.d
|
||||
- ./nginx/html:/usr/share/nginx/html:ro
|
||||
- ./nginx/dhparam:/etc/nginx/dhparam
|
||||
environment:
|
||||
DEFAULT_HOST: localhost
|
||||
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
restart: always
|
||||
networks:
|
||||
- database
|
||||
volumes:
|
||||
- ./postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password123
|
||||
POSTGRES_USER: statup
|
||||
POSTGRES_DB: statup
|
||||
|
||||
letsencrypt:
|
||||
container_name: letsencrypt
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
networks:
|
||||
- internet
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./nginx/certs:/etc/nginx/certs
|
||||
- ./nginx/vhost:/etc/nginx/vhost.d
|
||||
- ./nginx/html:/usr/share/nginx/html
|
||||
- ./nginx/dhparam:/etc/nginx/dhparam
|
||||
|
||||
watchtower:
|
||||
image: v2tec/watchtower
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: --interval 120 --cleanup
|
||||
|
||||
networks:
|
||||
internet:
|
||||
driver: bridge
|
||||
database:
|
||||
driver: bridge
|
Loading…
Reference in New Issue