Code Monkey home page Code Monkey logo

stack-openlitespeed's Introduction

OpenLiteSpeed Stack

Ansible playbooks for provisioning optimized web servers for WordPress and Laravel. These playbooks are used by Autopilot (our cloud server control panel) and are perfect for:

  • Local development environments.
  • High-performance production servers (with caching).

Requirements

  • Ansible
  • Ubuntu 20.04 LTS (Desktop/Server)

Inventory

Before you can provision a resource you've to provision a server first. Add your inventory to the hosts folder and provision a server or group using the following command:

Example:

# Provision a server (or group)
ansible-playbook server.yml -e host=<server>

Resources

Resource playbooks use variables defined in a resource file, add your resources to the resources folder and reference the file while running a playbook. You can find resource examples in the tests folder.

# Example
ansible-playbook site.yml -e @resources/sites/my-site.yml

Available resource variables are defined in the defaults folder of a resource role and validated in the first assert task of each tasks file.

Site

# Provision a site
ansible-playbook site.yml -e @resources/sites/my-site.yml

# Backup a site
ansible-playbook site.yml -e @resources/sites/my-site.yml -t backup

# List site backups
ansible-playbook site.yml -e @resources/sites/my-site.yml -t backup/list

# Restore site backup
ansible-playbook site.yml -e @resources/sites/my-site.yml -t backup/restore

# Destroy site backup
ansible-playbook site.yml -e @resources/sites/my-site.yml -t backup/destroy

# Destroy a site
ansible-playbook site.yml -e @resources/sites/my-site.yml -t destroy

Database

# Provision a database
ansible-playbook database.yml -e @resources/databases/my-database.yml

# Backup a database
ansible-playbook database.yml -e @resources/databases/my-database.yml -t backup

# List database backups
ansible-playbook database.yml -e @resources/databases/my-database.yml -t backup/list

# Restore database backup
ansible-playbook database.yml -e @resources/databases/my-database.yml -t backup/restore

# Destroy database backup
ansible-playbook database.yml -e @resources/databases/my-database.yml -t backup/destroy

# Destroy a database
ansible-playbook database.yml -e @resources/databases/my-database.yml -t destroy

User

# Provision a user
ansible-playbook user.yml -e @resources/users/my-user.yml

# Destroy a user
ansible-playbook user.yml -e @resources/users/my-user.yml -t destroy

Web Apps

  • phpMyAdmin: https://{{ site_domain }}/-/phpmyadmin/
  • Mailhog: https://{{ site_domain }}/-/mailhog/
  • Node Exporter: https://{{ site_domain }}/-/monitor/

Filesystem

  • Vhosts: /usr/local/lsws/conf/vhosts
  • MariaDB data: /opt/sitepilot/stack/mariadb/data

Site Files

  • Public path: /opt/sitepilot/sites/{{ site_name }}/files
  • Logs path: /opt/sitepilot/sites/{{ site_name }}/logs
  • Config path: /opt/sitepilot/sites/{{ site_name }}/.config
  • User home path: /opt/sitepilot/sites/{{ site_name }}/home

Author

These playbooks are developed and maintained by Nick Jansen.

stack-openlitespeed's People

Contributors

nbejansen avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vagrantsd

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.