fspringveldt/ss-docker-setup

There is no license information available for the latest version (dev-master) of this package.

Default docker setup for Silverstripe

dev-master 2017-04-27 00:13 UTC

This package is auto-updated.

Last update: 2024-04-13 10:12:07 UTC


README

Clones down a runnable docker Silverstripe environment. This sets up an eco-system with a database, a web-server (PHP + Apache) and a PHPMyAdmin container so you can access your database. A reverse nginx-proxy container is also used to provide virtual host names functionality.

Setup

  1. Install Composer and Docker
  2. Then run composer create-project -s dev fspringveldt/ss-docker-setup <desired-folder-name>. This pulls down the project and all it's files.
  3. Edit the file named .env project's root directory, adding values after the equals signs
  4. Edit your local hosts file (/etc/hosts on -nix systems) to point values given for PMA_VIRTUAL_HOST, DB_VIRTUAL_HOST and SS_VIRTUAL_HOST (defined in .env file above) to docker vm ip address
  5. Run cd <desired-folder-name>
  6. Run docker-compose build to build the images
  7. Once built, run docker-compose up -d to fire them up. To take them down run docker-compose down, adding a -v flag to remove any mounts.

Once you're setup you can shell into your ss-site container as such: docker exec -ti ss-site /bin/bash from whence you can run all your PHP CLI commands (git clone, composer create-project, etc.)