mirror of https://github.com/statping/statping
upgrades
parent
0cc0356e35
commit
337f5fe936
|
@ -1,20 +1,29 @@
|
|||
# Statup Servers
|
||||
There are multiple way to startup a Statup server. You want to make sure Statup is on it's own instance that is not on the same server as the applications you wish to monitor.
|
||||
It doesn't look good when your Status Page goes down, I recommend a small EC2 instance so you can set it, and forget it.
|
||||
|
||||
|
||||
## AWS EC2
|
||||
Get up and running with 0 configuration using an EC2 server along with our startup script.
|
||||
|
||||
## AWS EC2 (`ami-1f7c3567`)
|
||||
Running Statup on the smallest EC2 server is very quick using the AWS AMI Image: `ami-1f7c3567`.
|
||||
```
|
||||
|
||||
|
||||
aws ec2 run-instances \
|
||||
--image-id ami-1f7c3567 \
|
||||
--count 1 \
|
||||
--instance type t2.micro \
|
||||
--region us-west-2
|
||||
--key-name <key name> \
|
||||
--security-group-ids <your security group id here> \
|
||||
--subnet-id <your subnet id here> \
|
||||
--region <your region here>
|
||||
```
|
||||
|
||||
## Docker Compose
|
||||
In this folder there is a standard docker-compose file that include nginx, postgres, and Statup.
|
||||
```$xslt
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## Docker Compose with Automatic SSL
|
||||
You can automatically start a Statup server with automatic SSL encryption using this docker-compose file. First point your domain's DNS to the Statup server, and then run this docker-compose command with DOMAIN and EMAIL. Email is for letsencrypt services.
|
||||
```
|
||||
DOMAIN=mydomain.com EMAIL=info@mydomain.com \
|
||||
docker-compose -f docker-compose-ssl.yml up -d
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
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
|
||||
- ./statup/nginx/certs:/etc/nginx/certs:ro
|
||||
- ./statup/nginx/vhost:/etc/nginx/vhost.d
|
||||
- ./statup/nginx/html:/usr/share/nginx/html:ro
|
||||
- ./statup/nginx/dhparam:/etc/nginx/dhparam
|
||||
environment:
|
||||
DEFAULT_HOST: $DOMAIN
|
||||
|
||||
letsencrypt:
|
||||
container_name: letsencrypt
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
networks:
|
||||
- internet
|
||||
- database
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./statup/nginx/certs:/etc/nginx/certs:ro
|
||||
- ./statup/nginx/vhost:/etc/nginx/vhost.d
|
||||
- ./statup/nginx/html:/usr/share/nginx/html:ro
|
||||
- ./statup/nginx/dhparam:/etc/nginx/dhparam
|
||||
|
||||
statup:
|
||||
container_name: statup
|
||||
build: https://github.com/hunterlong/statup.git
|
||||
restart: always
|
||||
networks:
|
||||
- internet
|
||||
- database
|
||||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- ./statup/app:/app
|
||||
environment:
|
||||
VIRTUAL_HOST: $DOMAIN
|
||||
VIRTUAL_PORT: 8080
|
||||
LETSENCRYPT_EMAIL: info@mydomains.com
|
||||
LETSENCRYPT_HOST: $DOMAIN
|
||||
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
|
||||
|
||||
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
restart: always
|
||||
networks:
|
||||
- database
|
||||
volumes:
|
||||
- ./statup/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password123
|
||||
POSTGRES_USER: statup
|
||||
POSTGRES_DB: statup
|
||||
|
||||
networks:
|
||||
internet:
|
||||
driver: bridge
|
||||
database:
|
||||
driver: bridge
|
|
@ -21,9 +21,4 @@ mkdir statup
|
|||
cd statup
|
||||
wget https://raw.githubusercontent.com/hunterlong/statup/master/servers/docker-compose.yml
|
||||
sudo service docker start
|
||||
sudo docker-compose up -d
|
||||
|
||||
|
||||
|
||||
/etc/rc.local
|
||||
|
||||
sudo docker-compose up -d
|
Loading…
Reference in New Issue