Bash

Deploy WordPress via Docker

Tested on Ubuntu 22.04

This script deploys a WordPress stack via Docker Compose. There are two versions of this script, one for Nginx and one for Apache.

It prompts for the following parameters:

  • the WordPress domain
  • the WordPress port
  • the PHPMyAdmin port

Nginx version: (Github raw, repo link)

bash <(curl -sSL https://jrussell.sh/deploy-wordpress-docker-nginx)
  • uses Nginx as the container's web server
  • exposes the HTTPS port to the Docker host
    • this involves a redirect from HTTP, so it does not provide true HTTPS
  • uses certificate and key files located in /etc/ssl/private that match the domain name provided

Apache version: (Github raw, repo link)

bash <(curl -sSL https://jrussell.sh/deploy-wordpress-docker-apache)
  • uses Apache as the container's web server
  • exposes the HTTP port to the Docker host
By |2023-06-30T03:17:25+00:00January 5th, 2021|Comments Off on Deploy WordPress via Docker

Setup Apt

Tested on Ubuntu 20.04

This script updates the apt cache, performs upgrades, and removes unneeded packages.

Usage:

bash <(curl -sSL https://jrussell.sh/setup-apt)

Raw Script Contents

By |2021-01-05T08:26:13+00:00December 29th, 2020|Comments Off on Setup Apt

Create Sudo User automatically

Tested on Ubuntu 18.04

This script creates a new sudo user via script arguments.

Download:

wget https://raw.githubusercontent.com/JacFearsome/bash-scripts/master/automation/create-sudo-user-auto.sh

Usage:

sudo bash create-sudo-user-auto.sh -u user -p1 password -p2 password

Raw Script Contents

By |2020-12-22T06:44:55+00:00December 22nd, 2020|Comments Off on Create Sudo User automatically