Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Create install script #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions aws/generate_ssl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if [ $# -ne 2 ]; then
echo "Please provide a domain name and an email address."
else

# Generate SSL certificate using certbot
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install certbot

certbot certonly --standalone -d "$1" -d www."$1" --agree-tos \
--no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 \
-m "$2" \
--server https://acme-v02.api.letsencrypt.org/directory
fi
17 changes: 17 additions & 0 deletions aws/install-base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

sudo apt-get update

# Install snap store, certbot
sudo snap install snap-store
sudo snap install certbot

# Install Docker via snap store
sudo snap install docker
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
sudo snap disable docker
sudo snap enable docker

./install-compose.sh
5 changes: 5 additions & 0 deletions aws/install-compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Install Docker Compose
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
4 changes: 4 additions & 0 deletions aws/run_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cd website-factory
docker-compose up -d