Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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