Skip to content

Commit

Permalink
Merge pull request #396 from codeigniter4projects/develop
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
kenjis authored Sep 4, 2023
2 parents 92138aa + 7451f9c commit e477ebd
Show file tree
Hide file tree
Showing 64 changed files with 4,004 additions and 3,296 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
deploy:
name: 'Deploy to Production'
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
[![](https://github.com/codeigniter4projects/website/workflows/Deptrac/badge.svg)](https://github.com/codeigniter4projects/website/actions/workflows/deptrac.yml)
[![Coverage Status](https://coveralls.io/repos/github/codeigniter4projects/website/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4projects/website?branch=develop)

This is the official website for the CodeIgniter PHP framework.
This is the official website for the CodeIgniter PHP framework.

The website has been open-sourced in the interest of transparency.
We welcome issues and pull requests, to handle corrections.
We welcome issues and pull requests, to handle corrections.
New blog posts will not be accepted without prior authorization.

## Implementation

The site has been built with CodeIgniter 4, and is meant to be an example
of "good" programming style, although definitely not
the only way to do things.
the only way to do things.

Some of the programming design decisions reflected:

- The `public` folder is the intended document root for the webapp.
- The architecture adheres more to the "model-view-adapter" convention,
where the view is unaware of the source of data and the model is unaware of
how any data might be presented. The controllers are go-betweens.
- A "master template" lets each controller focus
- A "master template" lets each controller focus
only with building its part of a webpage.
- A base controller takes care of assembling finished pages, using the
- A base controller takes care of assembling finished pages, using the
master template.
- Mock data for the recent news and most recently active threads, means
that the website can be tested locally, without needing access to
that the website can be tested locally, without needing access to
the live forum database.
- View fragments are used to style single "records" on their own,
improving cohesion.
Expand All @@ -41,7 +41,7 @@ Some of the programming design decisions reflected:

## Server Requirements

PHP version 7.2 or higher is required, with the following extensions installed:
PHP version 7.4 or higher is required, with the following extensions installed:

- [intl](https://php.net/manual/en/intl.requirements.php)
- [libcurl](https://php.net/manual/en/curl.requirements.php) if you plan to use the `HTTP\CURLRequest` library
Expand All @@ -63,21 +63,25 @@ Use these steps to create a local installation for development and testing.
4. Install dependencies: `composer install`
5. Create your **.env** file: `cp env .env`
6. Edit **.env** and set at least the following:
* `CI_ENVIRONMENT = development`
* `database.default.database = ../writable/database.db`
* `database.default.DBDriver = SQLite3`

The website is intended to live on the same server as the forums, and uses the forum
database to pull in the most recent posts. When developing locally, this poses a challenge.
To make local development simpler, a migration and seed have been provided to setup a
table with some mock data that can be used in place of having a local MyBB install.

1. Migrate the database: `php spark migrate -all`
2. Run the seeder: `php spark db:seed ForumSeeder`
* `GITHUB_ACCESS_TOKEN = ghp_***`
* Set your GitHub Personal Access Token.
* `CI_ENVIRONMENT = development`
* `app.forceGlobalSecureRequests = false`
* `database.default.database = ../writable/database.db`
* `database.default.DBDriver = SQLite3`
7. Seed fake Forum data

The website is intended to live on the same server as the forums, and uses the forum
database to pull in the most recent posts. When developing locally, this poses a challenge.
To make local development simpler, a migration and seed have been provided to setup a
table with some mock data that can be used in place of having a local MyBB install.

1. Migrate the database: `php spark migrate -all`
2. Run the seeder: `php spark db:seed ForumSeeder`

At this point you should have a usable version of the current code! Try launching it locally:

1. From the repo directory start serving the website: `php spark serve`
2. In your web browser of choice navigate to the local URL: `http://localhost:8080`

> Note: The example commands above are for Linux-based systems. You may need to adjust for your operating system.
> **Note** The example commands above are for Linux-based systems. You may need to adjust for your operating system.
2 changes: 1 addition & 1 deletion app/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
* loaded early on, and may also contain additional functions
* that you'd like to use throughout your entire application
*
* @see: https://codeigniter4.github.io/CodeIgniter4/
* @see: https://codeigniter.com/user_guide/extending/common.html
*/
Loading

0 comments on commit e477ebd

Please sign in to comment.