GithubHelp home page GithubHelp logo

layer-apache-php's Introduction

Overview

This is a runtime layer that is intended to be built upon by other charm layers. It provides Apache2 and modphp5, and manages sites based on an apache.yaml defined in the charm layer that uses this.

Usage

In your charm layer's composer.yaml, you will need to include this layer, e.g.:

includes: ['layers:apache-php']

Then, you will need to include an apache.yaml file which can specify additional packages to install, and one or more sites to install and manage. Each site definition should include an install_from section whose keys are arguments to install_remote and should at a minimum include a source value. It can also include an options value, to be used for the Options directive, and a server_name value, to be used for the ServerName directive and which can reference config options via {config["<key>"]} interpolation. An example apache.yaml might look like:

packages:
    - 'php5-mysql'
    - 'php5-gd'
sites:
    vanilla:
        server_name: '{config["hostname"]}'
        options: 'Indexes FollowSymLinks MultiViews'
        install_from:
            source: https://github.com/vanillaforums/Garden/archive/Vanilla_2.0.18.8.tar.gz
            checksum: acf61a7ffca9359c1e1d721777182e51637be59744925935291801ccc8e8fd55
            hash_type: sha256

Your site will be installed in to /var/www/<site> where <site> is the name of your site entry (vanilla in the example above).

Finally, your charm layer will need to interact with this layer via reactive states. This layer will set the apache.available state once your apache.yaml has been processed and all sites installed, at which point your charm layer should perform any additional setup (such as creating site config files, opening the appropriate ports, etc) and then set the apache.start state.

layer-apache-php's People

Contributors

johnsca avatar nobuto-m avatar token47 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.