Materia development environment using as docker containers.
- Nginx as a web server (proxies to phpfpm for app and serves static files directly)
- PHP-FPM manages the PHP processes for the application
- MySQL for storing relational application data
- Memcached for caching data and sessions
- Node.js compiles all the js and css assets
- FakeS3 mocks AWS S3 behavior for asset uploading
Clone repo and execute ./run_first.sh
Please take note of the user accounts that are created for you in the install process. The user names and a random password will be echoed to the terminal after Composer installs the required PHP libraries.
-
Run the server
docker-compose up
-
Compile the coffeescript and sass
./run_assets_build.sh
-
Install composer libraries
docker-compose run --rm phpfpm composer install
-
Clone main materia widgets packages into fuel/app/tmp/widget_packages/*.wigt
./run_widgets_build.sh
-
Install all Widgets in fuel/app/tmp/widget_packages/*.wigt
./run_widgets_install.sh '*.wigt'
-
Installing widgets: Copy the widget file you want to install into app/fuel/app/tmp/widget_packages/ and then run install_widget.sh passing the name of the widget file to install. Example:
cp my_widget.wigt ~/my_projects/materia_docker/app/fuel/app/tmp cd ~/my_projects/materia_docker ./run_widgets_install.sh my_widget.wigt
-
Installing test widgets?
traverse to app/fuel/packages/materia/test/widget_source/ Update test widgets as desired. traverse into the widget folder. read build instructions in that widget's README.md Note: these widget are necessary when running run_tests.sh
If you wish to log into Materia, there are 2 default accounts created for you.
If you're wanting to update a php or mysql version, this can be done locally for testing before updating the global image.
- edit the desired dockerfile (or just alter the image in docker-compose if there is no dockerfile).
- Execute
./run_docker_build_web.sh
to build a new local web/php image. - OVERWRITE your locally tagged image:
docker tag materia-web-base:latest ucfopen/materia-web-base:latest
- Removing any existing running container using that image
- Start the desired container
- Verify the container is running the new version
- Test Materia
- submit a pull request (the containers are built and published automatically)
When running fuelphp's install, it uses fuel/app/config/development/migrations.php file to know the current state of your database. Fuel assumes this file is truth, and won't create tables even on an empty database. You probably need to delete the file and run the setup scripts again.
If you get a no space left on dev error: Remove the machine with docker-machine rm default
then start over from step 3 in OSX Docker Setup. You may need to attempt the rm command twice before it removes the VM successfully.)
Run oil commands: docker-compose run --rm phpfpm php oil ......
You can clone the repositories from the repositories from the materia widget config:
./run_build_widgets.sh
Then install them all
./run_widgets_install.sh '*.wigt'
Use the build_xxxx.sh
scripts to build new versions of the images. You'll need write access to the aws docker repository to upload them.