Permalink
Commits on Dec 30, 2017
Commits on Dec 19, 2017
  1. Added SSL for www.mwop.net

    weierophinney committed Dec 19, 2017
    The SSL cert I installed was for mwop.net, so handling the redirect to
    mwop.net via the same vhost would not work.
    
    What this does is add another SSL cert for www.mwop.net, and a dedicated
    server for it as well in nginx. This allows it to handle the incoming
    request and redirect it to the SSL variant of mwop.net.
    
    Also downgrades stratigility version to prevent autoloading issues,
    due to incompatibilities with webimpress/http-middleware-compat.
Commits on Dec 14, 2017
Commits on Nov 16, 2017
  1. Merge branch 'feature/zend-expressive-authentication'

    weierophinney committed Nov 16, 2017
    Use zend-expressive-authentication and
    phly-expressive-oauth2clientauthentication instead of site-specific
    implementation.
  2. Updated TODO list

    weierophinney committed Nov 16, 2017
  3. Removed Discourse code from site

    weierophinney committed Nov 16, 2017
    No longer useful.
  4. Extracted OAuth2ClientAuthentication module to separate repository

    weierophinney committed Nov 15, 2017
    Extracted OAuth2ClientAuthentication to package
    phly/phly-expressive-oauth2clientauthentication, and now require that as
    part of the site.
    
    Configuration updated to follow that package's format and conventions.
Commits on Nov 14, 2017
  1. Renamed module to Phly\OAuth2ClientAuthentication

    weierophinney committed Nov 14, 2017
    Adding "Client" into the namespace better indicates its purpose (vs
    acting as an OAuth2 server). Added `Phly` top-level namespace to allow
    separating it into its own repo.
Commits on Nov 13, 2017
  1. Refactors Auth code as a zend-expressive-authentication extension

    weierophinney committed Nov 13, 2017
    Creates an `AuthenticationInterface` via `OAuth2Adapter`, which does the
    work of negotiating the OAuth2 client, as well as persisting
    authentication data in the session.
    
    The ComicsPage was re-done as a vanilla Page with a session and
    authentication sitting in front of it.
    
    So far, only tested fully with the `DebugProvider`; however, the
    implementation appears to work as expected regarding the OAuth2 client
    workflow.
Commits on Nov 7, 2017
  1. Merge branch 'feature/csp-middleware'

    weierophinney committed Nov 7, 2017
    Use csp/middlewares instead of my home-grown solution.
Commits on Nov 3, 2017
  1. Merge branch 'feature/zend-expressive-session'

    weierophinney committed Nov 3, 2017
    Usage of zend-expressive-session instead of aura.session
  2. Merge branch 'feature/docker'

    weierophinney committed Nov 3, 2017
    Docker for deployment.
Commits on Oct 11, 2017
  1. Switches application to use zend-expressive-session and zend-expressi…

    weierophinney committed Oct 11, 2017
    …ve-csrf
    
    Instead of Aura.Session.
    
    Change allows removal of a number of factories, due to middleware no
    longer depending at initialization on session functionality, but rather
    at runtime.
    
    Segments _would_ be nice, but are not entirely necessary; the ability to
    set all data at once works well, too.
Commits on Sep 28, 2017
  1. Adds ability to specify nginx and php-fpm container versions

    weierophinney committed Sep 28, 2017
    This was done to allow rollback to known good versions.
    
    Pass one or more of the following to `make`:
    
    - `NGINX_VERSION`
    - `PHP_FPM_VERSION`
Commits on Sep 27, 2017
  1. Use `--no-save` flag when running npm as part of build process

    weierophinney committed Sep 27, 2017
    - Ensures package-lock.json does not get updated!
  2. Fully working docker configuration

    weierophinney committed Sep 27, 2017
    - Removes service workers for now; caching was too aggressive, causing
      false positive hits for pages such as auth, contact, that should not
      be cached.
    - Simpler, and, more importantly, reliable crontab setup. Pushes into
      `/etc/cron.d`, and:
      - Ensures it has correct permissions (done at container entry, to
        allow overriding via docker-compose mounted volumes).
      - Ensures the shell and path are set so that the jobs will run.
      - Ensures all stdout and stderr go to container.
    - Makefile improvements:
      - No longer attempts to set docker-machine env; was impossible to make
        this work reliably. Instead, it checks for the env and bails early
        if it is not set or incorrect.
      - Adds targets for building, tagging, and pushing php-fpm and nginx
        images.
Commits on Sep 26, 2017
  1. Working docker configuration for deployment

    weierophinney committed Sep 26, 2017
    - Adds `CopyAssetSymlinks` class, a console command for copying NPM
      assets into the public tree prior to deployment (vs. symlinks)
    - Created new composer scripts, `build-nginx` and `build-php-fpm`, with
      just the commands each needs to build assets for their containers.
    - Write session data to `data/sessions/` instead of system location;
      ensures permissions will work.
    - Updated php-fpm container to remove dependency on node and grunt; also
      updated to use the `build-php-fpm` target.
    - Updated `Makefile` to add targets for `nginx` and `php-fpm`. Removed
      the `machineenv` target, as it could be combined with the `deploy`
      target; additionally, fixed the command for `docker-machine` to ensure
      it actually executes! Finally, `all` now builds both containers and
      runs `deploy`.
  2. Fixes session config and feed display

    weierophinney committed Sep 26, 2017
    I was adding an expires header for `\.xml` files... which caused XML
    files served by the application to be looked for in the filesystem
    instead, and hit nginx's rules for 404 issues. Removing the `xml`
    extension from expire headers fixes that issue.
    
    Sessions were failing due to the configured `session.cookie_domain`;
    this was causing failures as evidently it did not match correctly,
    causing the `Cookie` header never to contain value provided by
    `Set-Cookie`.
  3. Adds a logging listener to the `ErrorHandler`

    weierophinney committed Sep 26, 2017
    The `ErrorHandler` allows you to attach listeners that act on the
    request, response, and error. This listener uses a PSR-3 logger
    (provided in this application via Monolog) in order to log errors passed
    to it.
    
    Internally, uses the Monolog `ErrorLogHandler`, which spits to the
    configured `error_log`; this will make it easy to see errors in the
    php-cli web server, and ensure that errors go to the docker log
    aggregator when deployed.
Commits on Sep 25, 2017
  1. Working docker deployment!

    weierophinney committed Sep 25, 2017
    - Ensure data/ directory is owned by www-data
    - Added expires headers to static files via nginx
    - Created template file `docker-stack.yml.dist`
      - Created script to find latest tags for related containers
      - Created script to fill in template strings in dist file
      - Created Makefile for creating `docker-stack.yml` and deploying it to swarm
  2. Trouble-shooting docker configuration

    weierophinney committed Sep 25, 2017
    - Attempting to get PHP error logs directed to docker log collector
    - Ensures HTTP redirects to SSL, and that both HTTP and HTTPS can be
      served out of the same vhost definition.
    - Ensures that SSL cert information is persisted between deployments.
Commits on Sep 21, 2017
  1. Use npm instead of yarn

    weierophinney committed Sep 21, 2017
    As of npm v5, the tool now supports a lockfile. This allows reducing a
    dependency.
Commits on Sep 20, 2017
  1. Initial nginx container

    weierophinney committed Sep 20, 2017
    Pulls in acme.sh, site configuration, and project public directory. A
    custom entrypoint script does the following:
    
    - Generates initial SSL certificates if they are missing, an env
      variable indictes they should be built, and expected env variables are
      present for the `acme.sh` command.
    - Starts the cron daemon
    - Starts nginx
  2. Initial working (dev) nginx container

    weierophinney committed Sep 20, 2017
    Builds on nginx:alpine, and adds the project root as
    `/var/www/mwop.net`, with a default host that uses it and proxies PHP
    calls to the php-fpm container.
Commits on Sep 19, 2017
  1. Working php-fpm container

    weierophinney committed Sep 19, 2017
    Uses php:7.1-fpm as its base, and:
    
    - Installs additional dependencies (nodejs, yarn, and libs needed for PHP extensions)
    - Installs required PHP extensions
    - Installs Composer
    - Installs PHP and php-fpm configuration
    - Installs all files necessary to run application to /var/www/mwop.net
    - Installs all files necessary to run application to /var/www/mwop.net
    - Sets up production local files
    - Runs `composer install` and `composer build`
    - Sets up crontab
    - Creates a new entrypoint that enables the cron service and runs php-fpm
  2. Adds yarn.lock, for reproducible installs

    weierophinney committed Sep 19, 2017
    Updates project to use yarn for NPM installations, to ensure they are
    reproducible.
Commits on Sep 18, 2017
  1. Initial docker support

    weierophinney committed Mar 6, 2017
Commits on Aug 18, 2017
  1. Picks up PhlyComic 1.1.1

    weierophinney committed Aug 18, 2017
Commits on Aug 8, 2017
  1. Updates to PhlyComic 1.1.0

    weierophinney committed Aug 8, 2017
    - Adds rules to exclude several comics during fetch as well.
Commits on Jul 20, 2017
  1. Merge branch 'feature/discourse-test'

    weierophinney committed Jul 20, 2017
    Discourse webhook logging.