Coder Social home page Coder Social logo

platform-build's Introduction

Platform Build

Transforms a Silverstripe CMS project into a deployable bundle using Composer and related tools. This is primarily designed for use during deployments to Silverstripe Cloud.

What is this?

This is a Docker container that runs three primary commands:

  • composer validate
  • composer install --no-progress --prefer-dist --no-dev --ignore-platform-reqs --optimize-autoloader --no-interaction --no-suggest
  • composer vendor-expose copy

If present in the codebase, and CLOUD_BUILD_DISABLED env variable is not set, it will also run the following scripts:

  • npm/yarn run cloud-build (after running npm/yarn install)
  • composer run-script cloud-build

Example usage / local debugging

You can run the container against a project locally to test or diagnose issues:

docker run \
    --interactive \
    --tty \
    --volume composer_cache:/tmp/cache \
    --volume ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
    --volume $PWD:/app \
    silverstripe/platform-build

--volume composer_cache:/tmp/cache

Creates a composer_cache volume if it doesn't exists and mounts that into the Composer home folder tmp

--volume ~/.ssh/id_rsa:/root/.ssh/id_rsa

If your source code has private repositories, you will need to mount your private key (deploy key) into the container (preferable as read only)

--volume $PWD:/app

The source code will be built from the /app directory inside the container, so make sure you mount your source code into that.

Maintenance

See maintenance.

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.