pixelbrackets/pap-skeleton

PHP App Publication - Skeleton Projekt

2.0.0 2021-11-22 09:21 UTC

This package is auto-updated.

Last update: 2024-03-24 17:45:08 UTC


README

This guide explains how to build and deploy the app.

The toolchain is set up with PAP.

Requirements

  • cURL, SSH & rsync to sync files
  • Git to checkout package repositories
  • PHP to run the script
  • Composer to fetch required PHP packages
  • SSH-Account on target stage(s) with read & write access, and right to run cURL, rsync and PHP
apt-get install curl ssh rsync git php
wget https://getcomposer.org/composer.phar

Installation

  • Fetch required PHP packages running ./composer.phar install

Usage

  • Run ./vendor/bin/pap to see all available tasks
  • Add --help to each task command, to see all available options
  • Add --simulate to each task command, to run in dry-mode first
  • Most tasks have a stage as target, passed with --stage <stagename>
  • If no stagename is passed, the name »local« is used as default - use this for development on your local machine
  1. Deploy to »live« stage

    ./vendor/bin/pap deploy --stage live
  2. Deploy to »local« stage, used for development (default stage)

    ./vendor/bin/pap deploy
  3. Sync to »local« stage (skips building assets)

    ./vendor/bin/pap sync
  4. Sync to »local« stage automatically if anything changes in the source directory (files changed, added or removed)

    ./vendor/bin/pap watch
  5. Lint current build

    ./vendor/bin/pap lint

Configuration

  • All general settings and shared stages are configured in the distribution file pap.yml
  • All settings and stages may be overriden in a local environment file pap.local.yml, which is ignored by Git
    • Copy pap.local.template.yml, rename it to pap.local.yml and change parameters as desired
  • The documentation of all options is available in the PAP package repository

Update

  • Update required PHP packages running ./composer.phar update
  • Commit the updated composer.lock file

Upgrade

  • Check the PAP package repository for new releases, and the upgrade guide