• Tim Rice's avatar
    Add the Apache and PHP container with a setup script · c9936684
    Tim Rice authored
    Runs the latest stable PHP on Debian with Apache 2.4 in front of it, from
    the php:apache base image. Apache reads its config from /data/web/site/config
    and serves /data/web/site/html, both bind mounted from the host, so the
    config and the site can be edited without rebuilding.
    
    The entrypoint fills either directory from a copy inside the image the first
    time it finds that directory empty, and leaves it alone after that.
    
    apache2_setup.sh does a whole install on a fresh Ubuntu 22.04 or newer
    machine. It installs Docker and the Compose plugin if they are missing,
    creates the directories, writes every file in this repo, then builds and
    starts the container. In a terminal it asks for the server name, paths, bind
    address and port, with a default for each. Piped, run from cron, or given
    --yes it asks nothing and uses the defaults and flags.
    
    The site is published on 127.0.0.1 by default, so a new install is not on the
    network until someone says so. The version banner is turned down as well:
    ServerTokens Prod, ServerSignature Off, expose_php Off and TraceEnable Off.
    c9936684
README.md 5.25 KB