2017 © Pedro Peláez
 

library ss4-docker-compose

image

brettt89/ss4-docker-compose

  • Thursday, June 22, 2017
  • by brettt89
  • Repository
  • 0 Watchers
  • 3 Stars
  • 29 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 16 % Grown

The README.md

SilverStripe 4 docker development environment

Docker based development environment for SilverStripe 4 applications Can be used on multiple environments at the same time., (*1)

Maintainer Contact

Requirements

Install

To install globally run:, (*2)

composer global require brettt89/ss4-docker-compose, (*3)

Make sure your ~/.composer/vendor/bin directory is in your PATH., (*4)

echo 'export PATH=$PATH:~/.composer/vendor/bin/' >> ~/.bash_profile, (*5)

Then you can run this script with docker-ss <docker-compose command> in your project root., (*6)

How to use

docker-ss in a nutshell is basically a wrapper for docker-compose with some added functionality and checks. all docker-compose commands should run as expected via docker-ss, (*7)

Environment file

Ensure you have an environment file setup in your project root with the following settings., (*8)

# DB credentials
SS_DATABASE_CLASS = "MySQLPDODatabase"
SS_DATABASE_SERVER = "database"
SS_DATABASE_USERNAME = "root"
SS_DATABASE_PASSWORD = ""
SS_DATABASE_NAME = "SS_mysite"

Start services

docker-ss up -d

By default, this setup will create 2 containers per project and 1 global nginx proxy (ss-proxy)., (*9)

Containers: - web (web server) - Hostname: {folder_name}.local - database (database server) - Hostname: {folder_name}.db.local, (*10)

NOTE: In order to access the servers by hostname you will need to map these domains to your "Hosts" IP., (*11)

E.g. File: /etc/hosts, ({folder_name} = "./ss4"), (*12)

127.0.0.1   ss4.local ss4.db.local

Advanced usage

The docker-compose executable included in this package does some additional checks and configuration with commands. This should always be used over the native docker-compose function., (*13)

However all docker-compose commands can be used via this package as per usual., (*14)

Running dev/build.

docker-ss exec web ./framework/sake dev/build

SSH into web server (Bash terminal).

docker-ss ssh

Accessing database from client

Host: {folder_name}.db.local
Port: 3306
Database: SS_mysite
Username: root
Password: <empty>

The Versions

22/06 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

19/05 2017

3.x-dev

3.9999999.9999999.9999999-dev

  Sources   Download

MIT

The Requires

 

19/05 2017

4.x-dev

4.9999999.9999999.9999999-dev

  Sources   Download

MIT

The Requires