diff --git a/checker.go b/checker.go index 3c5a2a8c..92feeecf 100644 --- a/checker.go +++ b/checker.go @@ -18,13 +18,13 @@ func CheckServices() { } func (s *Service) CheckQueue() { + defer s.CheckQueue() s.Check() if s.Interval < 1 { s.Interval = 1 } fmt.Printf(" Service: %v | Online: %v | Latency: %v\n", s.Name, s.Online, s.Latency) time.Sleep(time.Duration(s.Interval) * time.Second) - s.CheckQueue() } func (s *Service) Check() *Service { diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..170a8570 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,60 @@ +version: '2.3' + +services: + + 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 + volumes: + - /var/run/docker.sock:/tmp/docker.sock:ro + - /home/ubuntu/nginx/certs:/etc/nginx/certs:ro + - /home/ubuntu/nginx/vhost:/etc/nginx/vhost.d + - /home/ubuntu/nginx/html:/usr/share/nginx/html:ro + - /home/ubuntu/nginx/dhparam:/etc/nginx/dhparam + + statup: + container_name: statup + image: hunterlong/statup + networks: + - internet + - database + depends_on: + - nginx + - postgres + volumes: + - /home/ubuntu/statup:/app + environment: + VIRTUAL_HOST: statup.cjx.io + VIRTUAL_PORT: 8080 + DOMAIN: statup.cjx.io + DB_HOST: postgres + DB_USER: statup + DB_PASS: password123 + DB_DATABASE: statup + NAME: EC2 Example + DESCRIPTION: This is a Statup Docker Compose instance + + postgres: + container_name: postgres + image: postgres + restart: always + networks: + - database + volumes: + - /home/ubuntu/postgres:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: password123 + POSTGRES_USER: statup + POSTGRES_DB: statup + +networks: + internet: + driver: bridge + database: + driver: bridge \ No newline at end of file