#Docker

Archive of blog posts tagged with "docker"

  • A docker based setup for testing with Laravel

    I experienced some annoying issues while running integration tests in a Laravel app. The official MySQL docker image will create a user and a database for you which is very convenient, but that user does not have permission to create new databases. I configure my applications to use a separate database for testing, usually with a _testing suffix and so just hit a brick wall. The solution was to mount an entrypoint script, basically, some SQL statements I want to execute when the container is created. The script will create all of the necessary databases I need.

  • How To Use Docker Compose Effectively as a Development Tool

    In this article, I explore how Docker Compose can simplify software development, using Ruby on Rails as an example project. Docker Compose simplifies the setup and teardown of a project, reduces inconsistencies in development environments, and makes it easier to add ancillary services such as database and caching servers. I demonstrate this by creating a new Rails project, setting up a docker-compose.yml file, and adding services like PostgreSQL and Redis. Once done, I run and develop the new application in Docker. This process eliminates the need to juggle multiple versions of tools and services on a workstation, minimizes bugs caused by different development environments, and conserves resources. I also share insights on how to clone the example repo, create a new project, add the first service to Docker Compose, and develop the application in Docker.

  • Running Ruby on Rails on Docker

    Let's explore a process for running Ruby on Rails in Docker with Nginx to handle serving static assets.

  • Profiling and Debugging a PHP app with Xdebug and Docker

    I have started using an IDE again (PHPStorm) so that I could debug some applications and do some basic app profiling. I want to use Xdebug to profile my PHP apps. I am using Docker Compose on Windows 10. I have made this very complicated for myself but here we go.

‹ Prev
1
Next ›