This file contains hidden or 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
CREATE DATABASE `<SITE_ABBREVIATION>`; | |
CREATE USER '<SITE_ABBREVIATION>'@'%' IDENTIFIED BY '<PASSWORD>'; | |
GRANT SELECT ON <SITE_ABBREVIATION>.* TO '<SITE_ABBREVIATION>'@'%'; | |
GRANT INSERT ON <SITE_ABBREVIATION>.* TO '<SITE_ABBREVIATION>'@'%'; | |
GRANT DELETE ON <SITE_ABBREVIATION>.* TO '<SITE_ABBREVIATION>'@'%'; | |
GRANT CREATE ON <SITE_ABBREVIATION>.* TO '<SITE_ABBREVIATION>'@'%'; | |
GRANT UPDATE ON <SITE_ABBREVIATION>.* TO '<SITE_ABBREVIATION>'@'%'; | |
GRANT ALTER ON <SITE_ABBREVIATION>.* TO '<SITE_ABBREVIATION>'@'%'; |
This file contains hidden or 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
server { | |
listen 443 ssl; | |
server_name _; | |
root /var/www/<DOMAIN_NAME>-wp; | |
index index.php; | |
keepalive_timeout 70; | |
ssl_certificate /etc/nginx/certs/<DOMAIN_NAME>.pem; | |
ssl_certificate_key /etc/nginx/certs/<DOMAIN_NAME>.key; |
This file contains hidden or 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
sudo apt install -y jq wget unzip | |
cd ~ | |
version=$(curl https://api.github.com/repos/hashicorp/terraform/releases/latest --silent | jq ".tag_name" -r) | |
version=$(echo $version | sed 's/v//g') # get rid of 'v' from version number | |
echo "Installing Terraform $version." | |
url="https://releases.hashicorp.com/terraform/$version/terraform_$(echo $version)_linux_amd64.zip" | |
wget $url | |
unzip "terraform_$(echo $version)_linux_amd64.zip" | |
chmod +x terraform | |
sudo mv terraform /usr/local/bin/ |
This file contains hidden or 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
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: echo | |
labels: | |
name: echo |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: echo | |
namespace: echo | |
spec: | |
selector: | |
matchLabels: | |
app: echo | |
replicas: 2 |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echo | |
namespace: echo | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 5678 | |
selector: |
This file contains hidden or 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
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: echo-ingress | |
namespace: echo | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
spec: | |
rules: | |
- host: <YOUR_DOMAIN_NAME> |
This file contains hidden or 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: digitalocean-dns | |
namespace: cert-manger-issuer | |
data: | |
access-token: <DIGITAL_OCEAN_API_KEY> |
This file contains hidden or 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
apiVersion: cert-manager.io/v1alpha2 | |
kind: ClusterIssuer | |
metadata: | |
name: do-issuer-production | |
namespace: cert-manger-issuer | |
spec: | |
acme: | |
# The ACME server URL | |
server: https://acme-v02.api.letsencrypt.org/directory | |
# Email address used for ACME registration |
This file contains hidden or 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
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
# snip # | |
annotations: | |
# Add our annotation | |
cert-manager.io/cluster-issuer: letsencrypt-production | |
# end snip # | |
spec: | |
# snip # |