Replaced old vagrant setup with Docker

in #utopian-io7 years ago (edited)

Bug Fixes

  • What was the issue(s)?

The project was originally built using Vagrant and a basebox from a project called "Scotchbox," which was an all-in-one PHP basebox. In 2017 the Scotchbox team replaced their version 2.5 basebox with 3.0 and broke all the projects that were using 2.5.

This effectively broke development for anyone working on the project. While we did supply documentation for running the site directly from PHP, this is not a really modern development workflow.

This went unnoticed until recently, so a new development environment was needed to be put into place that was as easy to use as the older Vagrant setup.

  • What was the solution?

We had an older issue (https://github.com/phpmentoring/webapp/issues/94) for putting in a Docker Compose file, so that was the plan. Most web developers are starting to move to Docker anyway, and since this project is a way to get newer developers into working with open source software, this was the best time to make the switch.

A new docker-compose.yml file from http://container-builder.com was put in that added an Apache web server, MySQL database, and Mailhog for SMTP capturing. Since the default php-apache images assume a /var/www/html document root, I had to set up a replacement sed command to make it work with the public/ docroot the project actually uses.

The application also has some caching and logging, so the default docker settings needed to be modified to mount directories a bit more specifically than just mounting the entire project into /var/www/. This got around permissions issues in the Silex code that makes assumptions about it being deployed on a box with specific permissions for folders.

New developers can now get up and running much quicker than before, and the project now has a decent base for being deployed via containers.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @dragonmantank I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • This is your first accepted contribution here in Utopian. Welcome!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 96644.18
ETH 3621.07
USDT 1.00
SBD 3.84