project ss-docker-setup
Default docker setup for Silverstripe
fspringveldt/ss-docker-setup
Default docker setup for Silverstripe
- Thursday, April 27, 2017
- by fspringveldt
- Repository
- 1 Watchers
- 1 Stars
- 14 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
ss-docker-setup
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., (*1)
Setup
- Install Composer and Docker
- Then run
composer create-project -s dev fspringveldt/ss-docker-setup <desired-folder-name>
. This pulls down the project and all it's files.
- Edit the file named .env project's root directory, adding values after the equals signs
- 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
- Run
cd <desired-folder-name>
- Run
docker-compose build
to build the images
- 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.), (*2)
dev-master
9999999-dev
Default docker setup for Silverstripe
Sources
Download
by
Franco Springveldt