fspringveldt / ss-docker-setup
Default docker setup for Silverstripe
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:project
This package is auto-updated.
Last update: 2024-11-13 11:36:18 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
- 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 rundocker-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.)