Skip to content

Docker compose to setup nginx, php and mysql for CodeIgniter '4.0.3'.

Notifications You must be signed in to change notification settings

baseloo/codeigniter-docker

 
 

Repository files navigation

Dockerize Codeigniter

Docker compose to setup nginx, php and mysql for codeigniter 4.0.3.

Directory Structure

codeigniter-docker
├── docker
│   ├── mysql
│   │   └── based.sql
│   ├── nginx
│   │   └── nginx.conf
│   └── php
│       └── Dockerfile
├── docker-compose.yml
└── reset-db.sh

Images

  1. nginx → nginx:latest
  2. php → php:7.4-fpm
  3. mysql → mysql:5.7

Setup Initial DB

Copy your sql file to docker/mysql with based.sql as a file name.

Deployment using Docker

  1. Deploy nginx, php-fpm, and mysql using docker-compose
    docker-compose up -d
  2. Stop all container
    docker stop leru_nginx leru_mysql leru_php_fpm
  3. Remove all container
    docker rm leru_nginx leru_mysql leru_php_fpm
  4. Remove php-fpm image
    docker rmi codeigniter-docker_php_fpm
  5. Reset mysql data
    bash reset-db.sh

About

Docker compose to setup nginx, php and mysql for CodeIgniter '4.0.3'.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 97.9%
  • CSS 1.0%
  • JavaScript 0.9%
  • Smarty 0.2%
  • HTML 0.0%
  • Dockerfile 0.0%