GithubHelp home page GithubHelp logo

woutervddn / deploy-site Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 34 KB

Deploy multiple static and wordpress websites on a single VM using docker + letsencrypt + some simple scripts

HTML 17.92% Shell 82.08%

deploy-site's Introduction

Docker Compose Wordpress Host

Looking for an easier way to get wordpress websites up and running in a production environment. The idea is that this would live on a barebones ubuntu-server and would spin up new wordpress sites in no time

Features:

  • Docker-compose to spin up new wordpress sites ✔️
  • Nginx reverse proxy to handle multiple wordpress sites ✔️
  • SSL with Lets Encrypt ✔️
  • Mysql - MariaDB ✔️
  • PhpMyAdmin as a toggle to get access when needed but don't expose it unneccesarily ✔️
  • Easy upgradability & backup

Optional features:

  • Maybe a simple cli for management

Prerequisites

You need the following packages installed:

  • docker
  • docker-compose
  • git

This installation also assumes that you are allowed to run docker without being root. If not, use this to fix: sudo gpasswd -a $USER docker. You need to log out and back in for this to take effect.

Installation

  • Point your prefered domain to the IP of your server
  • First clone this repo: git clone https://github.com/woutervddn/deploy-site.git
  • Then cd deploy-site and sudo ./tools/init-server.sh
  • Check if you see the empty "silence is golden" portal on your hostname

Test usage

Set up an empty static website to check if everything works

  • Point a second domain to the IP of your server
  • cd deploy-site into the directory (if you're not there already)
  • Use ./tools/make-static-subsite.sh to generate a static site
  • Check if you see another empty site on the new hostname (different background color should appear)

Setup a Wordpress site

  • Point the right domain to the IP of your server
  • cd deploy-site into the directory (if you're not there already)
  • Use ./tools/make-wp-subsite.sh to generate a static site
  • Check if you see if wordpress is available on the new hostname

Enable PHPMyadmin

  • ssh into your server with portforwarding: ssh -C -D 1080 PRIMARY_HOSTNAME
  • setup a socks proxy on your host using 127.0.0.1:1080
  • on the server cd deploy-site into the directory (if you're not there already)
  • Use ./tools/enable-phpmyadmin.sh to enable phpmyadmin
  • paste the final output of the previous script in your browser

Disabling PHPMyadmin is as simple as ./tools/disable-phpmyadmin.sh

Wind down everything

Want do disable everything?

use ./tools/stop-all.sh to stop every docker container launched from here.

Updating a single site

  • cd to the right folder: cd sites/DOMAIN
  • now run docker-compose up -d to restart all containers

deploy-site's People

Contributors

woutervddn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.