-
-
Notifications
You must be signed in to change notification settings - Fork 2
docs: Add comprehensive installation guide with system requirements, methods, and post-installation setup. #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…methods, and post-installation setup.
Warning Rate limit exceeded@terabytesoftw has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 18 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughA new installation guide for a Yii2-based PHP application has been added. The documentation details system requirements, multiple installation methods, post-installation configurations, web server setup, development environment preparation, asset compilation, Docker usage, performance optimization, and references to further documentation. Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (3)
docs/installation.md (3)
91-105
: Harden Apache exampleConsider adding common hardening directives:
+Options -Indexes +<IfModule mod_headers.c> + Header always set X-Content-Type-Options "nosniff" +</IfModule>Prevents directory listing and MIME sniffing.
111-132
: Minor Nginx tweaks for PHP handling & security
- Use the stock
fastcgi.conf
(includes SCRIPT_FILENAME, etc.) instead of manual params.- Block hidden files earlier with
location ~ /\.(?!well-known).* { deny all; }
.- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; + include fastcgi.conf;
195-206
: Don’t commit real secrets in Docker Compose
DB_PASSWORD=secret
is fine for quick-start but encourage.env
overrides to avoid copy-paste into production:environment: - DB_HOST=${DB_HOST:-db} - DB_NAME=${DB_NAME:-myapp} - DB_USER=${DB_USER:-root} - DB_PASSWORD=${DB_PASSWORD:-changeme}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/installation.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/installation.md
[grammar] ~1-~1: Use correct spacing
Context: # Installation guide ## System requirements - [PHP
](https://...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: There might be a problem here.
Context: # Installation guide ## System requirements - PHP
8.1 or higher. - [Composer
](https://getco...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~6-~6: Use correct spacing
Context: ...ser](https://getcomposer.org/download/) for dependency management. - [
Yii2`](https...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: Use correct spacing
Context: ...Yii2
](https://github.com/yiisoft/yii2) 2.0.53+ or 22.x. - Web server (Apache, Nginx, o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~8-~8: Use correct spacing
Context: ... server (Apache, Nginx, or built-in PHP server). ### Optional requirements - Node.js: F...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~10-~10: Use correct spacing
Context: ... or built-in PHP server). ### Optional requirements - Node.js: For advanced asset compilati...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~13-~13: Use correct spacing
Context: ...tional) - Docker: For containerized development ## Installation methods ### Method 1: Usi...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~15-~15: Use correct spacing
Context: ...tainerized development ## Installation methods ### Method 1: Using Composer (Recommended) ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~17-~17: Use correct spacing
Context: ...n methods ### Method 1: Using Composer (Recommended) Create a new project using the Yii App ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~19-~19: Use correct spacing
Context: ...e a new project using the Yii App Basic template. bash composer create-project --prefer-dist --stability=dev yii2-extensions/app-basic myapp cd myapp
### Method 2: Manual installation 1. **Dow...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~26-~26: Use correct spacing
Context: ...yapp cd myapp ### Method 2: Manual installation 1. **Download the template**:
bash git cl...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~28-~28: Use correct spacing
Context: ... Manual installation 1. Download the template: bash git clone https://github.com/yii2-extensions/app-basic.git myapp cd myapp
2. Install dependencies ```bash composer...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~34-~34: There might be a mistake here.
Context: ...ic.git myapp cd myapp 2. **Install dependencies**
bash composer install ``` ### Method 3: Using Git Clone the reposito...
(QB_NEW_EN_OTHER)
[grammar] ~39-~39: Use correct spacing
Context: ...mposer install ``` ### Method 3: Using Git Clone the repository and set up your pr...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~41-~41: Use correct spacing
Context: ...t Clone the repository and set up your project. bash git clone https://github.com/yii2-extensions/app-basic.git myapp cd myapp rm -rf .git git init composer install
## Post-installation setup ### Directory ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~51-~51: Use correct spacing
Context: ...poser install ``` ## Post-installation setup ### Directory permissions Ensure the follo...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~53-~53: Use correct spacing
Context: ... Post-installation setup ### Directory permissions Ensure the following directories are wr...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~55-~55: Use correct spacing
Context: ...ing directories are writable by the web server. bash chmod 755 public/assets chmod 755 runtime chmod 755 tests/_output
### Environment configuration 1. **Create ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~63-~63: Use correct spacing
Context: ... 755 tests/_output ``` ### Environment configuration 1. Create environment file (optional) ``...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~65-~65: Use articles correctly
Context: ... Environment configuration 1. Create environment file (optional) ```bash cp .env.examp...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~65-~65: There might be a mistake here.
Context: ...uration 1. Create environment file (optional) bash cp .env.example .env
2. Configure database connection in `con...
(QB_NEW_EN_OTHER)
[grammar] ~70-~70: Use correct spacing
Context: ... 2. **Configure database connection** in
config/web/components.php` php <?php return [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=myapp', 'username' => 'root', 'password' => '', 'charset' => 'utf8', ], ];
### Web server configuration #### Apache ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~85-~85: There might be a problem here.
Context: ...> 'utf8', ], ]; ``` ### Web server configuration #### Apache Create .htaccess
in the project root....
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~89-~89: Use correct spacing
Context: ...ache Create .htaccess
in the project root. apache RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ public/$1 [L]
Create public/.htaccess
. ```apache R...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~98-~98: There might be a problem here.
Context: ...teRule ^(.*)$ public/$1 [L] Create `public/.htaccess`.
apache RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php #### Nginx Add to your Nginx configuration.
ng...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~109-~109: Use correct spacing
Context: ....php #### Nginx Add to your Nginx configuration.
nginx server { listen 80; server_name myapp.local; root /path/to/myapp/public; index index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ .php$ { fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /.(ht|svn|git) { deny all; } } ``` #### Built-in PHP server For development pu...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~135-~135: Use correct spacing
Context: ...eny all; } } #### Built-in PHP server For development purposes.
bash # Me...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~137-~137: Use correct spacing
Context: ...## Built-in PHP server For development purposes. bash # Method 1: Using PHP built-in server php -S localhost:8080 -t public # Method 2: Using Yii console command ./yii serve # Method 3: Custom host and port ./yii serve --host=0.0.0.0 --port=8080
## Development setup ### Database setup ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~150-~150: Use correct spacing
Context: ...0.0.0.0 --port=8080 ``` ## Development setup ### Database setup 1. Create database ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~152-~152: Use correct spacing
Context: ... ## Development setup ### Database setup 1. **Create database**
sql CREATE DATABAS...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~154-~154: Use correct spacing
Context: ... setup ### Database setup 1. Create database sql CREATE DATABASE myapp CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
2. Run migrations (if available) ```bash...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~159-~159: There might be a mistake here.
Context: ...code_ci; 2. **Run migrations** (if available)
bash ./yii migrate 3. **Seed test data** (optional)
bash ./y...
(QB_NEW_EN_OTHER)
[grammar] ~164-~164: Use correct spacing
Context: .../yii migrate 3. **Seed test data** (optional)
bash ./yii fixture/load ``` ### Asset compilation For advanced asset m...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~169-~169: Use correct spacing
Context: ...`bash ./yii fixture/load ### Asset compilation For advanced asset management.
bash...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~171-~171: Use correct spacing
Context: ...# Asset compilation For advanced asset management. bash # Install Node.js dependencies npm install # Compile assets npm run build # Watch for changes during development npm run watch
## Docker setup ### Using Docker Compose ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~184-~184: Use correct spacing
Context: ...evelopment npm run watch ``` ## Docker setup ### Using Docker Compose Create `docker-co...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~186-~186: Use correct spacing
Context: ... ## Docker setup ### Using Docker Compose Create `docker-compose.yml`.
yaml v...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~188-~188: Use correct spacing
Context: ...setup ### Using Docker Compose Create docker-compose.yml
. yaml version: '3.8' services: web: image: yiisoftware/yii2-php:8.1-apache ports: - "8080:80" volumes: - .:/app depends_on: - db environment: - DB_HOST=db - DB_NAME=myapp - DB_USER=root - DB_PASSWORD=secret db: image: mysql:8.0 environment: - MYSQL_ROOT_PASSWORD=secret - MYSQL_DATABASE=myapp volumes: - mysql_data:/var/lib/mysql volumes: mysql_data:
Run the application. ```bash docker-co...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~220-~220: Use correct spacing
Context: ...ql volumes: mysql_data: Run the application.
bash docker-compose up -d ### Using Docker directly
bash # Build ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~226-~226: Use correct spacing
Context: ...ker-compose up -d ### Using Docker directly
bash # Build custom image docker build -t myapp . # Run container docker run -p 8080:80 myapp ``` ### Performance optimization #### Enable O...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~236-~236: Use correct spacing
Context: ...n -p 8080:80 myapp ``` ### Performance optimization #### Enable OPcache Add to your php.ini
. ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~238-~238: There might be a mistake here.
Context: ...# Performance optimization #### Enable OPcache Add to your php.ini
. ```ini opcache....
(QB_NEW_EN_OTHER)
[grammar] ~240-~240: Use correct spacing
Context: ...ation #### Enable OPcache Add to your php.ini
. ini opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1
#### Configure caching Enable cache compone...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~252-~252: There might be a mistake here.
Context: ...che.fast_shutdown=1 ``` #### Configure caching Enable cache components in `config/web/...
(QB_NEW_EN_OTHER)
[grammar] ~254-~254: Use correct spacing
Context: ...ure caching Enable cache components in config/web/components.php
. php 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'enableStrictParsing' => false, 'rules' => [ // Your URL rules ], ],
## Next steps Once the installation is co...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~270-~270: Use correct spacing
Context: .../ Your URL rules ], ], ``` ## Next steps Once the installation is complete. - ⚙...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~272-~272: Use correct spacing
Context: ...## Next steps Once the installation is complete. - ⚙️ [Configuration Reference](configurat...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🔇 Additional comments (1)
docs/installation.md (1)
21-24
: Use the stable Composer template & drop--stability=dev
Pulling the dev template can expose users to unstable changes. Prefer the official stable package:
-composer create-project --prefer-dist --stability=dev yii2-extensions/app-basic myapp +composer create-project --prefer-dist yiisoft/yii2-app-basic myappIf the custom template is intentional, explicitly mention why the dev flag is required.
…to clarify `.htaccess` placement.
…tions for consistency.
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a full installation guide for the Yii2-based application and tweaks a small header in the README.
- Introduces
docs/installation.md
with system requirements, install methods, post-install steps, server configs, Docker usage, and optimization tips. - Updates README heading punctuation to remove the question mark.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
docs/installation.md | New comprehensive installation and setup guide |
README.md | Removed question mark from a section header |
Comments suppressed due to low confidence (1)
docs/installation.md:7
- The Yii version spec ‘22.x’ appears to be a typo. Consider updating it to ‘2.2.x’ or clarifying the intended version range.
- [`Yii2`](https://github.com/yiisoft/yii2) 2.0.53+ or 22.x.
Summary by CodeRabbit