A PHP Micro MVC Framework with Docker Containerization
To install the application, follow the steps below:
-
Clone the repository:
git clone https://github.com/azonedev/frame-x.git
-
Navigate to the cloned directory:
cd frame-x
-
Run the installation script:
sudo sh install.sh
or
sudo ./install.sh
-
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.
To start the containers, run the following command:
docker-compose up -d
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
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
The ./data
directory is used to store persistent data for the MySQL database.
- 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)
Feel free to contribute to this repository by creating issues and pull requests.