Share Application Data with PHP-FPM and Nginx Docker Containers

Share Application Data with PHP-FPM and Nginx Docker Containers

Using a named volume and a data container to share application data with PHP-FPM and Nginx Docker containers. In this example we are going to use Docker's "(named) volumes" option to keep our application files/data. This option offers better security as opposed to "bind(shared) volumes" in production environment.

In this example we are going to use Docker's "(named) volumes" option to keep our application files/data. This option offers better security as opposed to "bind(shared) volumes" in production environment. For more details read Manage data in Docker  page. Since we are not using "bind(shared) volumes" (this is generally used in development environment) we will be copying the application code into our "data container" called my_app . PHP-FPM and Nginx containers will then use this container to access the application data.

docker php nginx

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

PHP-FPM and Nginx access logs as standardised JSON string in Docker environment

Formatting PHP-FPM and Nginx access logs as standardised JSON string in Docker environment. If you want to change PHP-FPM and Nginx container log format to JSON while keeping same style, you can use example below.

Docker Explained: Docker Architecture | Docker Registries

Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub.

Using Unix Socket for Php-fpm and Nginx Docker Setup

How to Using unix socket for php-fpm and nginx docker setup. Follow example below to use a unix socket configuration in order for PHP-FPM and Nginx docker containers to talk to each other. Both containers are running as same user inanzzz.

Creating A Simple PHP-FPM, Nginx and MySQL Application with Docker Compose

Learn how to Creating a simple PHP-FPM, Nginx and MySQL application with docker compose. You can use example below if you want to create a simple PHP-FPM, Nginx and MySQL application with docker compose.

Using Fluent-Bit to forward Docker PHP-FPM and Nginx logs to Elasticsearch

Using Fluent-Bit to forward Docker PHP-FPM and Nginx logs to Elasticsearch. In this example we are going to forward our PHP-FPM and Nginx logs to Elasticsearch. In order to do that we will be using Fluent-Bit. Our monitoring stack is EFK (Elasticsearch Fluent-Bit Kibana).