pull/10/head
Hunter Long 2018-06-24 16:12:35 -07:00
parent cc13bbfb55
commit abe05f7f3b
3 changed files with 29 additions and 32 deletions

View File

@ -8,8 +8,6 @@ services:
ports:
- 0.0.0.0:80:80
- 0.0.0.0:443:443
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
networks:
- internet
restart: always
@ -20,20 +18,7 @@ services:
- ./statup/nginx/html:/usr/share/nginx/html:ro
- ./statup/nginx/dhparam:/etc/nginx/dhparam
environment:
DEFAULT_HOST: ${LETSENCRYPT_HOST}
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
DEFAULT_HOST: localhost
statup:
container_name: statup
@ -47,17 +32,15 @@ services:
volumes:
- ./statup/app:/app
environment:
VIRTUAL_HOST: ${LETSENCRYPT_HOST}
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: Statup on EC2
DESCRIPTION: This Status Status Page should be running ${LETSENCRYPT_HOST} with SSL.
NAME: EC2 Example
DESCRIPTION: This is a Statup Docker Compose instance
postgres:
container_name: postgres

View File

@ -1,5 +1,27 @@
#!/usr/bin/env bash
cd /home/ubuntu
curl -o /home/ubuntu/startup.sh -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/startup.sh
chmod +x /home/ubuntu/startup.sh
LETSENCRYPT_HOST=$LETSENCRYPT_HOST LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL ./startup.sh
sudo rm -rf startup.sh
sudo curl -o startup.sh -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/hunterlong/statup/master/servers/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

View File

@ -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