Giter Club home page Giter Club logo

codeigniter-docker's Introduction

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

codeigniter-docker's People

Contributors

lerufic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

codeigniter-docker's Issues

Error on Docker-compose up

Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /home/george/codeignite/codeigniter-docker/docker/mysql/data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.