Created
October 28, 2016 12:41
-
-
Save ngpestelos/8071c872ee9c5a61ad6a9d35eecde80e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
write_files: | |
- path: /opt/bin/install_docker_compose.sh | |
permissions: 0700 | |
owner: root | |
content: | | |
#!/bin/bash | |
set -e | |
set -u | |
mkdir -p /opt/bin | |
curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` -o /opt/bin/docker-compose | |
chmod +x /opt/bin/docker-compose | |
- path: /opt/bin/install_dhparam.sh | |
permissions: 0700 | |
owner: root | |
content: | | |
#!/bin/bash | |
set -e | |
set -u | |
mkdir -p /opt/dhparam | |
openssl dhparam -out /opt/dhparam/dhparam.pem 2048 | |
- path: /opt/bin/install_letsencrypt.sh | |
permissions: 0700 | |
owner: root | |
content: | | |
#!/bin/bash | |
set -e | |
set -u | |
mkdir -p /opt/letsencrypt | |
mkdir -p /opt/lib/letsencrypt | |
docker run --rm -p 443:443 -p 80:80 --name certbot -v /opt/letsencrypt:/etc/letsencrypt -v /opt/lib/letsencrypt:/var/lib/letsencrypt \ | |
quay.io/letsencrypt/letsencrypt:latest certonly -n --standalone --agree-tos --email <your-email-here> --domains <your-domain-here> | |
# hack for GitLab uid (1000) | |
chown -R 1000 /opt/letsencrypt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment