mirror of https://github.com/statping/statping
building
parent
cc13bbfb55
commit
abe05f7f3b
|
@ -8,8 +8,6 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 0.0.0.0:80:80
|
- 0.0.0.0:80:80
|
||||||
- 0.0.0.0:443:443
|
- 0.0.0.0:443:443
|
||||||
labels:
|
|
||||||
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
|
|
||||||
networks:
|
networks:
|
||||||
- internet
|
- internet
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -20,20 +18,7 @@ services:
|
||||||
- ./statup/nginx/html:/usr/share/nginx/html:ro
|
- ./statup/nginx/html:/usr/share/nginx/html:ro
|
||||||
- ./statup/nginx/dhparam:/etc/nginx/dhparam
|
- ./statup/nginx/dhparam:/etc/nginx/dhparam
|
||||||
environment:
|
environment:
|
||||||
DEFAULT_HOST: ${LETSENCRYPT_HOST}
|
DEFAULT_HOST: localhost
|
||||||
|
|
||||||
letsencrypt:
|
|
||||||
container_name: letsencrypt
|
|
||||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
|
||||||
networks:
|
|
||||||
- internet
|
|
||||||
restart: always
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
- ./statup/nginx/certs:/etc/nginx/certs
|
|
||||||
- ./statup/nginx/vhost:/etc/nginx/vhost.d
|
|
||||||
- ./statup/nginx/html:/usr/share/nginx/html
|
|
||||||
- ./statup/nginx/dhparam:/etc/nginx/dhparam
|
|
||||||
|
|
||||||
statup:
|
statup:
|
||||||
container_name: statup
|
container_name: statup
|
||||||
|
@ -47,17 +32,15 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./statup/app:/app
|
- ./statup/app:/app
|
||||||
environment:
|
environment:
|
||||||
VIRTUAL_HOST: ${LETSENCRYPT_HOST}
|
VIRTUAL_HOST: localhost
|
||||||
VIRTUAL_PORT: 8080
|
VIRTUAL_PORT: 8080
|
||||||
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}
|
|
||||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
||||||
DB_CONN: postgres
|
DB_CONN: postgres
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
DB_USER: statup
|
DB_USER: statup
|
||||||
DB_PASS: password123
|
DB_PASS: password123
|
||||||
DB_DATABASE: statup
|
DB_DATABASE: statup
|
||||||
NAME: Statup on EC2
|
NAME: EC2 Example
|
||||||
DESCRIPTION: This Status Status Page should be running ${LETSENCRYPT_HOST} with SSL.
|
DESCRIPTION: This is a Statup Docker Compose instance
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
container_name: postgres
|
container_name: postgres
|
||||||
|
|
|
@ -1,5 +1,27 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
cd /home/ubuntu
|
cd /home/ubuntu
|
||||||
curl -o /home/ubuntu/startup.sh -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/startup.sh
|
sudo rm -rf startup.sh
|
||||||
chmod +x /home/ubuntu/startup.sh
|
sudo curl -o startup.sh -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/startup.sh
|
||||||
LETSENCRYPT_HOST=$LETSENCRYPT_HOST LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL ./startup.sh
|
sudo chmod +x startup.sh
|
||||||
|
|
||||||
|
sudo rm -f docker-compose.yml
|
||||||
|
if [ "$LETSENCRYPT_HOST" = "" ]
|
||||||
|
then
|
||||||
|
sudo curl -o docker-compose.yml -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/docker-compose.yml
|
||||||
|
else
|
||||||
|
sudo curl -o docker-compose.yml -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/docker-compose-ssl.yml
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo service docker start
|
||||||
|
sudo docker system prune -af
|
||||||
|
|
||||||
|
if [ "$LETSENCRYPT_HOST" = "" ]
|
||||||
|
then
|
||||||
|
sudo docker-compose pull
|
||||||
|
sudo docker-compose up -d
|
||||||
|
else
|
||||||
|
sudo LETSENCRYPT_HOST=$LETSENCRYPT_HOST LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL docker-compose pull
|
||||||
|
sudo LETSENCRYPT_HOST=$LETSENCRYPT_HOST LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL docker-compose up -d
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
cd /home/ubuntu
|
|
||||||
rm -f docker-compose.yml
|
|
||||||
curl -o docker-compose.yml -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/docker-compose-ssl.yml
|
|
||||||
sudo service docker start
|
|
||||||
sudo docker system prune -af
|
|
||||||
sudo LETSENCRYPT_HOST=$LETSENCRYPT_HOST LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL docker-compose pull
|
|
||||||
sudo LETSENCRYPT_HOST=$LETSENCRYPT_HOST LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL docker-compose up -d
|
|
Loading…
Reference in New Issue