Download the PHP package hackolein/oc-bootstrapper without Composer

On this page you can find all versions of the php package hackolein/oc-bootstrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package oc-bootstrapper

Bootstrapper for October CMS

oc-bootstrapper is a command line tool that enables you to reconstruct an October CMS installation from a single configuration file.

It can be used to quickly bootstrap a local development environment for a project or to build and update a production installation during a deployment.

Features

Dependencies

Tested on

Works on Windows via Ubuntu Bash or Git Bash.

Example project

While using oc-bootstrapper it is a good idea to keep october.yaml, project's theme and project's plugins (those that are not shared among other projects) in project's repo.

Take a look at the OFFLINE-GmbH/octobertricks.com repo to see an example setup of oc-bootstrapper.

Installation

You can now run october from your command line.

Docker image

An official Docker image that bundles oc-bootstrapper, composer and Envoy is available on hub.docker.com as offlinegmbh/oc-bootstrapper.

It is intended to be used with CI pipelines but can also make getting started with an October project even easier as you don't need to install PHP and Composer locally.

You can execute any command in the context of the current working directory by using this docker command:

Be aware, that this will work great for commands like october init as it does not depend on any external services. To run october install some more plumbing is required so the container can connect to your database.

Usage

Initialize your project

Use the october init command to create a new empty project with a config file:

Change your configuration

In your newly created project directory you'll find an october.yaml file. Edit its contents to suite your needs.

Theme and Plugin syntax

oc-bootstrapper enables you to install plugins and themes from your own git repo. Simply append your repo's address in () to tell oc-bootstrapper to check it out for you. If no repo is defined the plugins are loaded from the October Marketplace.

Examples

Install October CMS

When you are done editing your configuration file, simply run october install to install October. oc-bootstrapper will take care of setting everything up for you. You can run this command locally after checking out a project repository or during deployment.

This command is idempotent, it will only install what is missing on subsequent calls.

Use the --help flag to see all available options.

Install additional plugins

If at any point in time you need to install additional plugins, simply add them to your october.yaml and re-run october install. Missing plugins will be installed.

Use a custom php binary

Via the --php flag you can specify a custom php binary to be used for the installation commands:

Update October CMS

If you want to update the installation you can run

Push changes to remote git repo

To push local changes to the current git remote run

This command can be run as cron job to keep your git repo up-to-date with changes on production.

SSH deployments

Set the deployment option to false if you don't want to setup deployments.

Setup

You can use oc-bootstrapper with any kind of deployment software. You need to setup the following steps:

  1. Connect to the target server (via SSH)
  2. Install composer and oc-bootstrapper
  3. Run october install

You can run this "script" for each push to your repository. The october install command will only install what is missing from the target server.

Example setup for GitLab CI

To initialize a project with GitLab CI support set the deployment option in your config file to gitlab.

This will setup a Envoy.blade.php.

  1. Create a SSH key pair to log in to your deployment target server
  2. Create a SSH_PRIVATE_KEY variable in your GitLab CI settings that contains the created private key
  3. Edit the Envoy.blade.php script to fit your needs
  4. Push to your repository. GitLab will run the example .gitlab-ci.yml configuration

Cronjob to commit changes from prod into git

If a deployed website is edited by a customer directly on the prod server you might want to commit those changes back to your git repository.

To do this, simply create a cronjob that executes october push every X minutes. This command will commit all changes to your git repo automatically with message [ci skip] Added changes from $hostname.

File templates

You can overwrite all default file templates by creating a folder called october in your global composer directory. Usually it is located under ~/.config/composer.

Place the files you want to use as defaults in ~/.config/composer/october. All files from the templates directory can be overwritten.

On Windows you can store your files in %USERPROFILE%/AppData/Roaming/Composer/october/

Variable replacements

It is possible to use placeholders in your configuration files which will be replaced by values from your october.yaml configuration:

There is a special placeholder %app.hostname% available that will be replaced by the host part of your app.url:

File templates from a git repository

If your templates folder is a git repository oc-bootstrapper will pull the latest changes for the repo every time you run october init.

This is a great feature if you want to share the template files with your team via a central git repository. Just make sure you are able to fetch the latest changes via git pull and you're all set!

Development environments

oc-bootstrapper can set up a development environment for you. Currently, only Lando is supported out of the box.

To enable the Lando integration, run october init and select lando as a dev environment. A .lando.yml file will be placed in your project.

You can now simply run lando start to get everything up and running inside a Docker environment created by Lando.


All versions of oc-bootstrapper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.8
guzzlehttp/guzzle Version ~6.0|~7.0
offline/gitelephant Version 3.0.2
symfony/console Version ~3.0|~4.0
symfony/process Version ~3.0|~4.0
symfony/filesystem Version ~3.0|~4.0
symfony/yaml Version ~3.0|~4.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hackolein/oc-bootstrapper contains the following files

Loading the files please wait ....