forked from gomzyakov/secretnotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
114 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine on | ||
RewriteCond %{REQUEST_URI} !^public | ||
RewriteRule ^(.*)$ public/$1 [L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,91 @@ | ||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p> | ||
# SecretNotes | ||
|
||
<p align="center"> | ||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a> | ||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a> | ||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a> | ||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a> | ||
</p> | ||
## Deployment | ||
|
||
## About Laravel | ||
Несколько шагов: | ||
|
||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: | ||
- Заводим VDS | ||
- Вручную готовим VDS | ||
- Задаем секретки в репозитории на GitHub | ||
|
||
- [Simple, fast routing engine](https://laravel.com/docs/routing). | ||
- [Powerful dependency injection container](https://laravel.com/docs/container). | ||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. | ||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). | ||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations). | ||
- [Robust background job processing](https://laravel.com/docs/queues). | ||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). | ||
### Prepare VDS | ||
|
||
Laravel is accessible, powerful, and provides tools required for large, robust applications. | ||
Создаём VDS-виртуалку, например в [NetAngels](https://panel.netangels.ru). | ||
|
||
## Learning Laravel | ||
|
||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. | ||
Заходим по SSH и проверяем версию PHP (`php -v). Если необходимо, [обновляемся до PHP 8](https://php.watch/articles/php-8.0-installation-update-guide-debian-ubuntu): | ||
|
||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. | ||
```bash | ||
sudo apt update | ||
sudo apt install software-properties-common | ||
sudo apt update | ||
sudo add-apt-repository ppa:ondrej/php | ||
sudo apt update | ||
sudo apt install php8.0-common php8.0-cli -y | ||
``` | ||
|
||
## Laravel Sponsors | ||
Если необходимо, доустанавливаем PHP-расширения на виртуалке: | ||
|
||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). | ||
```bash | ||
sudo apt install php8.0-xml | ||
sudo apt install php8.0-curl | ||
``` | ||
|
||
### Premium Partners | ||
Вручную [устанавливаем](https://getcomposer.org/download/) Composer: | ||
|
||
- **[Vehikl](https://vehikl.com/)** | ||
- **[Tighten Co.](https://tighten.co)** | ||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** | ||
- **[64 Robots](https://64robots.com)** | ||
- **[Cubet Techno Labs](https://cubettech.com)** | ||
- **[Cyber-Duck](https://cyber-duck.co.uk)** | ||
- **[Many](https://www.many.co.uk)** | ||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** | ||
- **[DevSquad](https://devsquad.com)** | ||
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** | ||
- **[OP.GG](https://op.gg)** | ||
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** | ||
- **[Lendio](https://lendio.com)** | ||
```bash | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | ||
php composer-setup.php | ||
php -r "unlink('composer-setup.php');" | ||
```` | ||
|
||
## Contributing | ||
И делаем его доступным для вызова через `composer`: | ||
|
||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). | ||
```bash | ||
sudo mv composer.phar /usr/local/bin/composer | ||
``` | ||
|
||
|
||
>Далее делаем всё от пользователя `web`, не `root`!!! | ||
|
||
|
||
|
||
ssh-keygen | ||
|
||
|
||
|
||
|
||
В репозитории на GitHub, в разделе `Settings > Secrets > Actions` задаём значения: | ||
|
||
- `SSH_PRIVATE_KEY`. If you don’t have this you can run ssh-keygen in your server terminal to generate a new key, then run the command cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys to allow connection to the private key. | ||
- `SSH_HOST`. This is the IP address of the server. | ||
- `SSH_USERNAME`. This is the server username, in my case it’s root . If you don’t know your username you can use the whoami command on your server to check. | ||
|
||
В репозитории, в разделе `Deploy keys`, задаём значение публичного ключа с виртуальной машины (получить можно через `cat ~/.ssh/id_rsa.pub`). Это позволит деплоиться через `git pull` с VDS. | ||
|
||
|
||
|
||
/var/www/web/sites | ||
|
||
```bash | ||
git clone [email protected]:gomzyakov/secretnotes.git secretnotes.ru | ||
`````` | ||
/var/www/web/sites/secretnotes.ru | ||
php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
composer install | ||
php artisan key:generate | ||
chmod -R 777 storage bootstrap/cache | ||
## Code of Conduct | ||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). | ||
## Security Vulnerabilities | ||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed. | ||
## License | ||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.