https://github.com/mlouguid/containerize-app-php
How to dockerize simple project php-nginx-mysql-redis
https://github.com/mlouguid/containerize-app-php
docker docker-compose github-actions k8s mysql nginx php redis
Last synced: about 1 year ago
JSON representation
How to dockerize simple project php-nginx-mysql-redis
- Host: GitHub
- URL: https://github.com/mlouguid/containerize-app-php
- Owner: mlouguid
- Created: 2025-04-03T11:23:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-23T11:16:43.000Z (about 1 year ago)
- Last Synced: 2025-04-23T11:26:11.413Z (about 1 year ago)
- Topics: docker, docker-compose, github-actions, k8s, mysql, nginx, php, redis
- Language: PHP
- Homepage:
- Size: 1.29 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# containerize-php-app

## Project Requirements
β’ Containerized application using PHP, Nginx, MySQL, and Redis
β’ Simple PHP application code for demonstration
β’ CI/CD setup using GitHub Actions
β’ Deployment to Kubernetes (K8s)
## π To get started quickly, just follow these steps:
π‘ **Note**: Before starting the project locally, make sure you have Docker Desktop and Docker Compose installed on your system.
> - [Install Docker & Docker Compose on macOS](https://docs.docker.com/desktop/install/mac-install/)
> - [Install Docker & Docker Compose on Windows](https://docs.docker.com/desktop/install/windows-install/)
Once installed, youβre ready to spin up the environment locally.
## Infra Project
```sh
βββ docker-compose.yaml
βββ services/
β βββ database/
β β βββ mysql/
β β β βββ Dockerfile
β β β βββ .env
β β βββ redis/
β β β βββ Dockerfile
β β β βββ .env
β βββ web/
β βββ nginx/
β β βββ Dockerfile
β β βββ app.conf
β β βββ fastcgi_params
β β βββ .env
β βββ php/
β βββ public/
β β βββ index.php
β βββ src/
β βββ composer.json
β βββ Dockerfile
β βββ .env
βββ infra/
β βββ k8s/
β βββ deployments/
β βββ services/
```
## Deploy to Docker Compose
```sh
docker-compose up -d
```
## Deploy to k8s
```sh
kubectl apply -f infra/k8s
```