Skip to content

A PHP Micro MVC Framework with Docker Containerization

Notifications You must be signed in to change notification settings

azonedev/frame-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frame-X

A PHP Micro MVC Framework with Docker Containerization

Prerequisites

Installation

To install the application, follow the steps below:

  1. Clone the repository:

    git clone https://github.com/azonedev/frame-x.git
    
  2. Navigate to the cloned directory:

    cd frame-x
    
  3. Run the installation script:

    sudo sh install.sh
    

    or

    sudo ./install.sh
    
  4. Take a coffee break while the script installs the application. And here you go, the application is ready to use at:

    http://localhost:8023
    

If error occurs, related to composer dependencies, run the following command:

docker-compose exec php composer install

The installation script checks for the existence of docker-compose.yml and .env files, and copies them from the example files if they do not exist. The command also installs after the docker containers up composer dependencies and restarts the containers.

Usage

To start the containers, run the following command:

docker-compose up -d

The containers can be accessed at:

Application Browse On :

http://localhost:8023

For database external access the environment variables are valid if you don't change the default values:

  • SERVER = localhost
  • PORT = 3306
  • DB_DATABASE = framex
  • USER = root
  • DB_PASSWORD = fR@m12X
  • Connection Type = MySQL (TCP/IP)

To stop the containers, run the following command:

docker-compose down

Services

The following services are included in the docker-compose.yml file:

  • Nginx: serves the application
  • PHP: the main application container
  • MySQL: stores the application data

Volumes

The ./data directory is used to store persistent data for the MySQL database.

Application Structure

- frame-x/
   - app/
      - app/
         - Controllers
         - Core
            - Application Bootstrap, Config, DB connection, Base Model, Router, View
         - Exceptions
         - Models
         - RequestValidators
         - Services
      - public/
         - index.php
      - views/
         - submissions/
            - index.php
      - env
   - .data (local docker volume)
   - .docker (docker configs)
      - nginx
      - php
   - .env
   - docker-compose.yml
   - install.sh (install app)

Contributing

Feel free to contribute to this repository by creating issues and pull requests.

About

A PHP Micro MVC Framework with Docker Containerization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published