sunnah-com / website

The sunnah.com website
163 stars 54 forks source link

sunnah-website

This is the front end code for sunnah.com. It is built atop the Yii 2 MVC framework.

The top level structure is divided into application code (in the application folder) that includes MVC code and the public folder which contains index.php, css, js, and others.

Your webserver should point to the public folder. The Yii framework code needs to reside on the machine as well; its location is hardcoded into public/index.php.

Under the application folder, here are the important locations:

Running on Windows

Working with the Dev Container

If you don't want to set up a complete dev environment on your host, you can use a Docker container to host the PHP environment, dependencies, and web server. The source code is mounted as a volume inside the container, so any changes will reflect immediately inside the container without having to rebuild it.

Launching the dev container is composed of a simple docker-compose command. First however, copy the .env.local.sample file to .env.local (important). Then run the following command in the same directory as the Dockerfile:

docker-compose up --build

You should then be able to access the webserver using port 80 on the container's host.

Use Visual Studio Code with Remote Containers extensions to attach to running instance and try out changes rapidly.

Use the php cs fixer extension for formatting code.