Skip to content

Local Development Environment

To be productive, developers require local development environments which mirror their dev / staging / production counterparts.

Below is an example workflow for developers when getting started.

Upgrading to the Latest Docker Compose Configuration

Our current Docker Compose stack provides developers with a simple, easy to use local development solution which can run on any operating system.

This is enabled by 2 major releases from Skpr and the Docker Desktop product:

We highly recommend developers upgrade their local development environments for the best developer experience.

This can be done using our Docker Compose Upgrade Guide and using our examples referenced below.

Docker Compose

Overview

The following local developer architecture is built to:

  • Mimic production
  • Decoupled Web/CLI architecture
  • Frontend developers get their own image/toolchain

Example

Below are a list of example stacks:

Bash Aliases

Here are some optional bash aliases to enhance your Docker Compose workflow.

We will use these later in the document.

alias dcu="docker-compose"
alias dcu="dc up"
alias dce="dc exec"

Command Line Containers

Skpr decouples the Web and CLI containers to provide a smaller attack surface for environments (see shell for more info).

To mimic this locally we have setup CLI services which can be used with the dce alias from above.

Running a PHP command

dce php-cli composer install

Running a NodeJS command

dce frontend yarn install

Spinning up the environment

To spin up the environment run the following command:

$ dcu

The environment will be available via http://localhost:8080