mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3658be4a44 | ||
|
|
7c206dd392 | ||
|
|
18193f00d7 | ||
|
|
85339d41b0 | ||
|
|
38c3438e52 | ||
|
|
156e18b600 | ||
|
|
5eec7c127b | ||
|
|
8130534405 | ||
|
|
938855b302 | ||
|
|
ed42318732 | ||
|
|
a3c98b1e34 | ||
|
|
46cf908c19 | ||
|
|
5c89df907e | ||
|
|
0c23163a57 | ||
|
|
bac028312a | ||
|
|
e8863e32cd | ||
|
|
361815107f | ||
|
|
f8f932893c | ||
|
|
63c0387e15 | ||
|
|
050bca13e5 | ||
|
|
8bf337bba1 | ||
|
|
dfc5f9c894 | ||
|
|
77426dfbe8 | ||
|
|
de2cd7ec5c | ||
|
|
4e98de314a | ||
|
|
f6899a205a | ||
|
|
965c588475 | ||
|
|
eefc91d9e5 | ||
|
|
254e2aaeed | ||
|
|
56df6c3fb2 | ||
|
|
4216f0d9ad | ||
|
|
4272bfd569 | ||
|
|
54e841cbae | ||
|
|
b48a163a89 | ||
|
|
b6a1b17043 | ||
|
|
dbc62a329e | ||
|
|
bfe604a880 | ||
|
|
4d10ed80f0 | ||
|
|
12aa5d84ab | ||
|
|
844613772c | ||
|
|
ca916e4455 | ||
|
|
4390603cdd | ||
|
|
601311beef | ||
|
|
229350ad1d | ||
|
|
fb8c14f643 | ||
|
|
386e511a06 | ||
|
|
121af05159 | ||
|
|
a45f83ef23 | ||
|
|
8ae88e954a | ||
|
|
201d39d645 | ||
|
|
8f735c046b | ||
|
|
7eb4ef2932 | ||
|
|
2fc9d623f6 | ||
|
|
58a9093464 | ||
|
|
5d507e7be7 | ||
|
|
124d138edf | ||
|
|
7e920366e4 | ||
|
|
a6f6810dd1 | ||
|
|
84dce14077 | ||
|
|
b16e846d05 | ||
|
|
2526947af3 | ||
|
|
1f64785719 | ||
|
|
d95bd3bf4d | ||
|
|
dcc6126e5a | ||
|
|
4f90ae94f2 | ||
|
|
c6c9fa51a5 | ||
|
|
714c444d8f | ||
|
|
6adf68474b | ||
|
|
4973bd08e8 | ||
|
|
5561be3ebf | ||
|
|
f0279bb883 | ||
|
|
15aca28ce2 | ||
|
|
bad7d2130a | ||
|
|
1d1d08ea07 | ||
|
|
bbf3877959 | ||
|
|
8c80ab3134 | ||
|
|
8ca36c7e41 | ||
|
|
0d88dea4b7 | ||
|
|
d953c36486 |
6
.devcontainer/devcontainer.json
Normal file
6
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "Openclassify",
|
||||||
|
// Script to run to bootstrap the app when the space is created
|
||||||
|
"postCreateCommand": "bash install.sh",
|
||||||
|
"outputCapture": "std"
|
||||||
|
}
|
||||||
16
.env-sail
16
.env-sail
@ -1,16 +1,18 @@
|
|||||||
APP_ENV=local
|
APP_NAME=oc
|
||||||
|
APP_ENV=production
|
||||||
INSTALLED="false"
|
INSTALLED="false"
|
||||||
|
APP_URL_TYPE="HTTP_X_FORWARDED_HOST"
|
||||||
APP_KEY=DYKEBxfEHK1PP4mUbP3gWPtsPZgXh0qX
|
APP_KEY=DYKEBxfEHK1PP4mUbP3gWPtsPZgXh0qX
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
DEBUG_BAR=false
|
DEBUG_BAR=true
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=mysql
|
#DB_HOST=mysql
|
||||||
DB_DATABASE=oopenclassify
|
DB_HOST=host.docker.internal
|
||||||
DB_USERNAME=root
|
DB_DATABASE=oc
|
||||||
DB_PASSWORD=
|
DB_USERNAME=oc
|
||||||
|
DB_PASSWORD=oc
|
||||||
APPLICATION_NAME=Default
|
APPLICATION_NAME=Default
|
||||||
APPLICATION_REFERENCE=default
|
APPLICATION_REFERENCE=default
|
||||||
APPLICATION_DOMAIN=http://localhost
|
|
||||||
ADMIN_USERNAME=admin
|
ADMIN_USERNAME=admin
|
||||||
ADMIN_EMAIL=admin@example.com
|
ADMIN_EMAIL=admin@example.com
|
||||||
ADMIN_PASSWORD=admin
|
ADMIN_PASSWORD=admin
|
||||||
|
|||||||
16
.env.example
Normal file
16
.env.example
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
APP_ENV=local
|
||||||
|
INSTALLED=false
|
||||||
|
APP_KEY=spNWIbUUSkRICcUwBGOaDzgwWsLjqUVq
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_DATABASE=forge
|
||||||
|
DB_USERNAME=forge
|
||||||
|
DB_PASSWORD=forge
|
||||||
|
APPLICATION_NAME=Default
|
||||||
|
APPLICATION_REFERENCE=default
|
||||||
|
ADMIN_USERNAME=$adminUserName
|
||||||
|
ADMIN_EMAIL=admin@example.com
|
||||||
|
ADMIN_PASSWORD=admin123
|
||||||
|
LOCALE=en
|
||||||
|
AUTO_TOKEN=spNWITUUSkRICcUwBGOaDzGwWsLqUVqX
|
||||||
|
APP_TIMEZONE=UTC
|
||||||
31
.gitignore
vendored
31
.gitignore
vendored
@ -1 +1,32 @@
|
|||||||
.idea
|
.idea
|
||||||
|
.env
|
||||||
|
.coverage
|
||||||
|
/bin
|
||||||
|
/core
|
||||||
|
/build
|
||||||
|
/vendor
|
||||||
|
/coverage
|
||||||
|
/node_modules
|
||||||
|
/bower_components
|
||||||
|
composer.lock
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.txt text eol=lf
|
||||||
|
*.xml text eol=lf
|
||||||
|
*.json text eol=lf
|
||||||
|
*.properties text eol=lf
|
||||||
|
*.conf text eol=lf
|
||||||
|
*.sh text eol=lf
|
||||||
|
Dockerfile text eol=lf
|
||||||
|
|
||||||
|
*.awk text eol=lf
|
||||||
|
*.sed text eol=lf
|
||||||
|
*.sh text eol=lf
|
||||||
|
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
|
||||||
|
*.p12 binary
|
||||||
@ -1,38 +0,0 @@
|
|||||||
# Contribution Guide
|
|
||||||
|
|
||||||
Thank you for considering contributing! Please review the entire guide before sending a pull request.
|
|
||||||
|
|
||||||
## Bug Reports
|
|
||||||
|
|
||||||
Wes strongly encourages pull requests, not just bug reports.
|
|
||||||
|
|
||||||
"Bug Report" should contain a title and a clear detailed description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
|
|
||||||
|
|
||||||
Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.
|
|
||||||
|
|
||||||
|
|
||||||
## Which Repository?
|
|
||||||
|
|
||||||
Please send all issues to the base `openclassify/openclassify` repository in order to keep them consolidated.
|
|
||||||
Send all pull requests to the respective repository in which they apply to and the branch as described below.
|
|
||||||
|
|
||||||
|
|
||||||
## Which Branch?
|
|
||||||
|
|
||||||
All bug fixes should be sent to the latest stable branch. Bug fixes should never be sent to the master branch unless they fix features that exist only in the upcoming release.
|
|
||||||
|
|
||||||
Minor features that are fully backwards compatible with the current release may be sent to the latest stable branch.
|
|
||||||
|
|
||||||
Major new features should always be sent to the master branch, which contains the upcoming release.
|
|
||||||
|
|
||||||
|
|
||||||
## Security Vulnerabilities
|
|
||||||
|
|
||||||
If you discover a security vulnerability, please send an e-mail to info@openclassify.com. All security vulnerabilities will be promptly addressed.
|
|
||||||
|
|
||||||
|
|
||||||
## Coding Style
|
|
||||||
|
|
||||||
Project follows the PSR-4, PSR-2 and PSR-1 coding standards. In addition to these standards, the following coding standards should be followed:
|
|
||||||
|
|
||||||
The class namespace declaration must be on the same line as <?php.
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
@servers(['web' => 'yoursite@50.59.80.150 -p 22400'])
|
|
||||||
|
|
||||||
@task('update', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php /usr/bin/composer update -o --no-dev
|
|
||||||
php artisan migrate --all-addons --force
|
|
||||||
php artisan migrate --force
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('pull', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
git pull
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('migrate', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php artisan migrate --all-addons --force
|
|
||||||
php artisan migrate --force
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('compile', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php artisan streams:compile
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('clear', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php artisan httpcache:clear
|
|
||||||
php artisan assets:clear
|
|
||||||
php artisan cache:clear
|
|
||||||
php artisan route:clear
|
|
||||||
php artisan view:clear
|
|
||||||
php artisan twig:clear
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('install', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php artisan addon:install {{$addon}}
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('uninstall', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php artisan addon:uninstall {{$addon}}
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@task('reinstall', ['on' => 'web'])
|
|
||||||
cd /home/yoursite
|
|
||||||
php artisan addon:reinstall {{$addon}}
|
|
||||||
@endtask
|
|
||||||
|
|
||||||
@macro('push')
|
|
||||||
pull
|
|
||||||
clear
|
|
||||||
migrate
|
|
||||||
@endmacro
|
|
||||||
|
|
||||||
@macro('deploy')
|
|
||||||
push
|
|
||||||
update
|
|
||||||
compile
|
|
||||||
clear
|
|
||||||
@endmacro
|
|
||||||
69
INSTALL.md
69
INSTALL.md
@ -1,69 +0,0 @@
|
|||||||
# Installation
|
|
||||||
|
|
||||||
## Server Requirements
|
|
||||||
|
|
||||||
- PHP >= 7.2
|
|
||||||
- XML PHP Extension
|
|
||||||
- PDO PHP Extension
|
|
||||||
- cURL PHP Extension
|
|
||||||
- JSON PHP Extension
|
|
||||||
- Ctype PHP Extension
|
|
||||||
- BCMath PHP Extension
|
|
||||||
- SQLite PHP Extension
|
|
||||||
- OpenSSL PHP Extension
|
|
||||||
- Mbstring PHP Extension
|
|
||||||
- Fileinfo PHP Extension
|
|
||||||
- Tokenizer PHP Extension
|
|
||||||
- GD Library (>=2.0) **OR** Imagick PHP extension (>=6.5.7)
|
|
||||||
|
|
||||||
|
|
||||||
### Via Composer
|
|
||||||
|
|
||||||
> Do not create an `.env` file just yet - Installer will generate one for you.{.important}
|
|
||||||
|
|
||||||
```bash
|
|
||||||
composer create-project openclassify/openclassify
|
|
||||||
```
|
|
||||||
|
|
||||||
### Host Configuration
|
|
||||||
|
|
||||||
When you setup your web host be sure to point the web root to `public` directory. Just as you would a normal Laravel installation.
|
|
||||||
|
|
||||||
#### Alternate Directories for cPanel or Virtualmin
|
|
||||||
|
|
||||||
In some environments like cPanel or Virtualmin it may be difficult to use the `public` directory as the web root. In these cases we suggest symlinking the `public` directory to `public_html`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ln -s public public_html
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also simply rename the `public` directory to `public_html`. Path hints will automatically use the correct path.
|
|
||||||
|
|
||||||
### Directory Permissions
|
|
||||||
|
|
||||||
After installing, you may need to configure some permissions in order to proceed. Directories within the `storage`, `public/app`, and the `bootstrap/cache` directories should be writable by your web server. If you are using the [Homestead](http://laravel.com/docs/homestead) virtual machine, these permissions should already be set.
|
|
||||||
|
|
||||||
|
|
||||||
## Installing
|
|
||||||
|
|
||||||
### Running the Installation Wizard
|
|
||||||
|
|
||||||
After downloading and it's dependencies with:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
composer install
|
|
||||||
```
|
|
||||||
you will need to install the software in order to get started.
|
|
||||||
By this time you should be able to visit your site's URL which will
|
|
||||||
redirect you to the installer: `http://yoursite.com/installer`
|
|
||||||
|
|
||||||
### Using the CLI Installer
|
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
php artisan install
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
You will be prompted for details in order to proceed with the installation process.
|
|
||||||
|
|
||||||
1
Procfile
1
Procfile
@ -1 +0,0 @@
|
|||||||
web: INSTALLED=false php artisan streams:compile && INSTALLED=true bin/heroku-php-apache2 public/
|
|
||||||
152
README.md
152
README.md
@ -1,31 +1,64 @@
|
|||||||
<br>
|
<br>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://openclassify.com"><img src="https://raw.githubusercontent.com/openclassify/openclassify/master/public/openclassify-logo.png" width="250" alt="Openclassify Logo"></a>
|
<a href="https://openclassify.com"><img src="https://raw.githubusercontent.com/openclassify/openclassify/master/public/openclassify-logo.png" width="250" alt="Openclassify Logo"></a>
|
||||||
|
|
||||||
|
OpenClassify is modular and most advanced open source classified platform build with Laravel included Pyrocms.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/v"></a>
|
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank">
|
||||||
|
<img class="badge" src="http://poser.pugx.org/openclassify/openclassify/v">
|
||||||
|
</a>
|
||||||
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/downloads"></a>
|
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/downloads"></a>
|
||||||
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/license"></a>
|
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/license"></a>
|
||||||
<a href="https://scrutinizer-ci.com/g/openclassify/openclassify/?branch=master" rel="nofollow"><img src="https://camo.githubusercontent.com/b1809c56d5b15765dabaf72c173e7f9aba9e7b721ccb0036e9db5da62869e6b1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e636c6173736966792f6f70656e636c6173736966792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572" alt="Scrutinizer Code Quality" data-canonical-src="https://scrutinizer-ci.com/g/openclassify/openclassify/badges/quality-score.png?b=master" style="max-width: 100%;"></a>
|
|
||||||
<a href="https://scrutinizer-ci.com/g/openclassify/openclassify/build-status/master" rel="nofollow"><img src="https://camo.githubusercontent.com/07509845a0eab157141235a794cd09967425222639d63d640d689763250f0da3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e636c6173736966792f6f70656e636c6173736966792f6261646765732f6275696c642e706e673f623d6d6173746572" alt="Build Status" data-canonical-src="https://scrutinizer-ci.com/g/openclassify/openclassify/badges/build.png?b=master" style="max-width: 100%;"></a>
|
|
||||||
<a href="https://scrutinizer-ci.com/code-intelligence" rel="nofollow"><img src="https://camo.githubusercontent.com/9fcde20119b3a44e430ad50f1bb3c2db3db753df9c3b2ade5cd14217a0a971ab/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e636c6173736966792f6f70656e636c6173736966792f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572" alt="Code Intelligence Status" data-canonical-src="https://scrutinizer-ci.com/g/openclassify/openclassify/badges/code-intelligence.svg?b=master" style="max-width: 100%;"></a>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
### Install with Docker
|
||||||
|
|
||||||
## About OpenClassify
|
We suggest to use Docker. Nginx, Mysql and PHP 8.2 pre-installed. MacOS, Windows and Ubuntu is supported.
|
||||||
|
Install Docker and run it. Install by watching 2 min video on [Youtube](https://www.youtube.com/watch?v=vVpVmsxq-Z0&t=27s&pp=ygUTb3BlbmNsYXNzaWZ5IGRvY2tlcg%3D%3D)
|
||||||
OpenClassify is modular and most advanced open source classified platform build with Laravel 8 & PHP 8.1 Supported. Included Pyrocms 3.9
|
|
||||||
|
|
||||||
|
|
||||||
## Translation
|
1- Clone project
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/openclassify/openclassify.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2- Run install.sh
|
||||||
|
```bash
|
||||||
|
bash install.sh
|
||||||
|
```
|
||||||
|
3- That's it!
|
||||||
|
|
||||||
|
Open project at [localhost](http://localhost)
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
You can visit this link for detailed documentation.
|
||||||
|
https://visiosoft.gitbook.io/v2/
|
||||||
|
|
||||||
|
### CLI Commands
|
||||||
|
|
||||||
|
If you couldn't find a solution for any problem, please review our CLI Command document.
|
||||||
|
[View CLI Command Document](https://github.com/openclassify/openclassify/blob/master/docs/cli-commands.md)
|
||||||
|
|
||||||
|
### Other Installation Methods
|
||||||
|
|
||||||
|
Check [here](https://github.com/openclassify/openclassify/blob/master/docs/other-install-methods.md) for more.
|
||||||
|
|
||||||
|
|
||||||
|
### Translation
|
||||||
|
|
||||||
Openclassify support 22+ languages. If you'd like to contribute translations, please check out our [Crowdin](https://crowdin.com/project/openclassify) project.
|
Openclassify support 22+ languages. If you'd like to contribute translations, please check out our [Crowdin](https://crowdin.com/project/openclassify) project.
|
||||||
|
|
||||||
## Server Requirements
|
### Server Requirements
|
||||||
|
|
||||||
- Supports PHP 7.3 and later (8.1 Supported)
|
- Only PHP > 8.2 Officially Supported!
|
||||||
- XML PHP Extension
|
- XML PHP Extension
|
||||||
- PDO PHP Extension
|
- PDO PHP Extension
|
||||||
- cURL PHP Extension
|
- cURL PHP Extension
|
||||||
@ -40,109 +73,12 @@ Openclassify support 22+ languages. If you'd like to contribute translations, pl
|
|||||||
- GD Library (>=2.0) **OR** Imagick PHP extension (>=6.5.7)
|
- GD Library (>=2.0) **OR** Imagick PHP extension (>=6.5.7)
|
||||||
|
|
||||||
|
|
||||||
## Via Composer
|
### Code Contributors
|
||||||
|
|
||||||
> Do not create an `.env` file just yet - Installer will generate one for you.{.important}
|
|
||||||
|
|
||||||
```bash
|
|
||||||
composer create-project openclassify/openclassify
|
|
||||||
```
|
|
||||||
|
|
||||||
### Via Docker
|
|
||||||
|
|
||||||
We suggest to use Docker.
|
|
||||||
|
|
||||||
https://github.com/openclassify/openclassify/wiki/Installing-Openclassify-on-windows-docker-desktop
|
|
||||||
|
|
||||||
### Host Configuration
|
|
||||||
|
|
||||||
When you setup your web host be sure to point the web root to `public` directory. Just as you would a normal Laravel installation.
|
|
||||||
|
|
||||||
#### Alternate Directories for cPanel or Virtualmin
|
|
||||||
|
|
||||||
In some environments like cPanel or Virtualmin it may be difficult to use the `public` directory as the web root. In these cases we suggest symlinking the `public` directory to `public_html`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ln -s public public_html
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also simply rename the `public` directory to `public_html`. Path hints will automatically use the correct path.
|
|
||||||
|
|
||||||
### Directory Permissions
|
|
||||||
|
|
||||||
After installing, you may need to configure some permissions in order to proceed. Directories within the `storage`, `public/app`, and the `bootstrap/cache` directories should be writable by your web server. If you are using the [Homestead](http://laravel.com/docs/homestead) virtual machine, these permissions should already be set.
|
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
### Running the Installation Wizard
|
|
||||||
|
|
||||||
After downloading and it's dependencies with:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
composer install
|
|
||||||
```
|
|
||||||
you will need to install the software in order to get started.
|
|
||||||
By this time you should be able to visit your site's URL which will
|
|
||||||
redirect you to the installer: `http://yoursite.com/installer`
|
|
||||||
|
|
||||||
### Using the CLI Installer
|
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
php artisan install
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
You will be prompted for details in order to proceed with the installation process.
|
|
||||||
|
|
||||||
> You may need to run `ulimit -n 1024` before installing via CLI to temporarily increase your max open files limit.
|
|
||||||
|
|
||||||
#### Automating the CLI Installer
|
|
||||||
|
|
||||||
You can automate the installer by creating your own .env file with something like this:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
APP_ENV=local
|
|
||||||
APP_DEBUG=true
|
|
||||||
APP_KEY=zfesbnTkXvooWVcsKMw2r4SmPVNGbFoS
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=localhost
|
|
||||||
DB_DATABASE=workbench
|
|
||||||
DB_USERNAME=root
|
|
||||||
DB_PASSWORD=root
|
|
||||||
APPLICATION_NAME=Default
|
|
||||||
APPLICATION_REFERENCE=default
|
|
||||||
APPLICATION_DOMAIN=localhost
|
|
||||||
ADMIN_EMAIL=info@openclassify.com
|
|
||||||
ADMIN_USERNAME=admin
|
|
||||||
ADMIN_PASSWORD=password
|
|
||||||
LOCALE=en
|
|
||||||
TIMEZONE=Turkey/Istanbul
|
|
||||||
```
|
|
||||||
> The APP_KEY must be exactly 32 characters in length.
|
|
||||||
|
|
||||||
Then run the installer and indicate that the system is ready to install:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
php artisan install --ready
|
|
||||||
```
|
|
||||||
|
|
||||||
## CLI Commands
|
|
||||||
|
|
||||||
If you couldn't find a solution for any problem, please review our CLI Command document.
|
|
||||||
[View CLI Command Document](https://github.com/openclassify/openclassify/blob/master/docs/cli-commands.md)
|
|
||||||
|
|
||||||
## Code Contributors
|
|
||||||
|
|
||||||
This project exists thanks to all the people who [contribute](https://github.com/openclassify/openclassify/graphs/contributors) and more.
|
This project exists thanks to all the people who [contribute](https://github.com/openclassify/openclassify/graphs/contributors) and more.
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|
||||||
<a href = "https://github.com/openclassify/openclassify/graphs/contributors">
|
<a href = "https://github.com/openclassify/openclassify/graphs/contributors">
|
||||||
<img src = "https://contrib.rocks/image?repo=openclassify/openclassify"/>
|
<img src = "https://contrib.rocks/image?repo=openclassify/openclassify"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
Thanks to Ryan and his stream platform PyroCMS which makes OpenClassify more powerful.
|
|
||||||
|
|||||||
15
SECURITY.md
15
SECURITY.md
@ -1,15 +0,0 @@
|
|||||||
# Security Policy
|
|
||||||
|
|
||||||
## Supported Versions
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
| Version | Supported |
|
|
||||||
| ------- | ------------------ |
|
|
||||||
| 2.x | :x: |
|
|
||||||
| 1.x | :white_check_mark: |
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
|
||||||
|
|
||||||
|
|
||||||
If you discover any security related issues, please email info@openclassify.com instead of using the issue tracker.
|
|
||||||
@ -1 +0,0 @@
|
|||||||
theme: jekyll-theme-cayman
|
|
||||||
20
app.json
20
app.json
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "PyroCMS",
|
|
||||||
"description": "A barebones Pyro install.",
|
|
||||||
"repository": "https://github.com/pyrocms/pyrocms",
|
|
||||||
"logo": "https://pyrocms.com/files/vendors/logo-inverted_512@2x.jpg",
|
|
||||||
"keywords": [
|
|
||||||
"pyrocms",
|
|
||||||
"laravel",
|
|
||||||
"cms",
|
|
||||||
"php"
|
|
||||||
],
|
|
||||||
"addons": [
|
|
||||||
{
|
|
||||||
"plan": "heroku-postgresql",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"postdeploy": "composer install"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,446 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Lang;
|
|
||||||
|
|
||||||
use Countable;
|
|
||||||
use Illuminate\Contracts\Translation\Loader;
|
|
||||||
use Illuminate\Contracts\Translation\Translator as TranslatorContract;
|
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Illuminate\Support\NamespacedItemResolver;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Illuminate\Support\Traits\Macroable;
|
|
||||||
use InvalidArgumentException;
|
|
||||||
|
|
||||||
class Translator extends NamespacedItemResolver implements TranslatorContract
|
|
||||||
{
|
|
||||||
use Macroable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The loader implementation.
|
|
||||||
*
|
|
||||||
* @var \Illuminate\Contracts\Translation\Loader
|
|
||||||
*/
|
|
||||||
protected $loader;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The default locale being used by the translator.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $locale;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The fallback locale used by the translator.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $fallback;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The array of loaded translation groups.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $loaded = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The message selector.
|
|
||||||
*
|
|
||||||
* @var \Illuminate\Translation\MessageSelector
|
|
||||||
*/
|
|
||||||
protected $selector;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new translator instance.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Contracts\Translation\Loader $loader
|
|
||||||
* @param string $locale
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(Loader $loader, $locale)
|
|
||||||
{
|
|
||||||
$this->loader = $loader;
|
|
||||||
|
|
||||||
$this->setLocale($locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if a translation exists for a given locale.
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @param string|null $locale
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function hasForLocale($key, $locale = null)
|
|
||||||
{
|
|
||||||
return $this->has($key, $locale, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if a translation exists.
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @param string|null $locale
|
|
||||||
* @param bool $fallback
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function has($key, $locale = null, $fallback = true)
|
|
||||||
{
|
|
||||||
return $this->get($key, [], $locale, $fallback) !== $key;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the translation for the given key.
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @param array $replace
|
|
||||||
* @param string|null $locale
|
|
||||||
* @param bool $fallback
|
|
||||||
* @return string|array
|
|
||||||
*/
|
|
||||||
public function get($key, array $replace = [], $locale = null, $fallback = true)
|
|
||||||
{
|
|
||||||
|
|
||||||
$locale = $locale ?: $this->locale;
|
|
||||||
|
|
||||||
// For JSON translations, there is only one file per locale, so we will simply load
|
|
||||||
// that file and then we will be ready to check the array for the key. These are
|
|
||||||
// only one level deep so we do not need to do any fancy searching through it.
|
|
||||||
$this->load('*', '*', $locale);
|
|
||||||
|
|
||||||
$line = $this->loaded['*']['*'][$locale][$key] ?? null;
|
|
||||||
|
|
||||||
// If we can't find a translation for the JSON key, we will attempt to translate it
|
|
||||||
// using the typical translation file. This way developers can always just use a
|
|
||||||
// helper such as __ instead of having to pick between trans or __ with views.
|
|
||||||
if (!isset($line)) {
|
|
||||||
[$namespace, $group, $item] = $this->parseKey($key);
|
|
||||||
|
|
||||||
// Here we will get the locale that should be used for the language line. If one
|
|
||||||
// was not passed, we will use the default locales which was given to us when
|
|
||||||
// the translator was instantiated. Then, we can load the lines and return.
|
|
||||||
$locales = $fallback ? $this->localeArray($locale) : [$locale];
|
|
||||||
|
|
||||||
foreach ($locales as $locale) {
|
|
||||||
if (!is_null($line = $this->getLine(
|
|
||||||
$namespace, $group, $locale, $item, $replace
|
|
||||||
))) {
|
|
||||||
return $line;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the line doesn't exist, we will return back the key which was requested as
|
|
||||||
// that will be quick to spot in the UI if language keys are wrong or missing
|
|
||||||
// from the application's language files. Otherwise we can return the line.
|
|
||||||
return $this->makeReplacements($line ?: $key, $replace);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a translation according to an integer value.
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @param \Countable|int|array $number
|
|
||||||
* @param array $replace
|
|
||||||
* @param string|null $locale
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function choice($key, $number, array $replace = [], $locale = null)
|
|
||||||
{
|
|
||||||
$line = $this->get(
|
|
||||||
$key, $replace, $locale = $this->localeForChoice($locale)
|
|
||||||
);
|
|
||||||
|
|
||||||
// If the given "number" is actually an array or countable we will simply count the
|
|
||||||
// number of elements in an instance. This allows developers to pass an array of
|
|
||||||
// items without having to count it on their end first which gives bad syntax.
|
|
||||||
if (is_array($number) || $number instanceof Countable) {
|
|
||||||
$number = count($number);
|
|
||||||
}
|
|
||||||
|
|
||||||
$replace['count'] = $number;
|
|
||||||
|
|
||||||
return $this->makeReplacements(
|
|
||||||
$this->getSelector()->choose($line, $number, $locale), $replace
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the proper locale for a choice operation.
|
|
||||||
*
|
|
||||||
* @param string|null $locale
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function localeForChoice($locale)
|
|
||||||
{
|
|
||||||
return $locale ?: $this->locale ?: $this->fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve a language line out the loaded array.
|
|
||||||
*
|
|
||||||
* @param string $namespace
|
|
||||||
* @param string $group
|
|
||||||
* @param string $locale
|
|
||||||
* @param string $item
|
|
||||||
* @param array $replace
|
|
||||||
* @return string|array|null
|
|
||||||
*/
|
|
||||||
protected function getLine($namespace, $group, $locale, $item, array $replace)
|
|
||||||
{
|
|
||||||
$this->load($namespace, $group, $locale);
|
|
||||||
|
|
||||||
$line = Arr::get($this->loaded[$namespace][$group][$locale], $item);
|
|
||||||
|
|
||||||
if (is_string($line)) {
|
|
||||||
return $this->makeReplacements($line, $replace);
|
|
||||||
} elseif (is_array($line) && count($line) > 0) {
|
|
||||||
foreach ($line as $key => $value) {
|
|
||||||
$line[$key] = $this->makeReplacements($value, $replace);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $line;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make the place-holder replacements on a line.
|
|
||||||
*
|
|
||||||
* @param string $line
|
|
||||||
* @param array $replace
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function makeReplacements($line, array $replace)
|
|
||||||
{
|
|
||||||
if (empty($replace)) {
|
|
||||||
|
|
||||||
if (config()->has('override_text')) {
|
|
||||||
foreach (config()->get('override_text') as $override) {
|
|
||||||
$override = explode(':', $override);
|
|
||||||
if (count($override) > 1) {
|
|
||||||
$line = $override[0] == $line ? $override[1] : $line;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $line;
|
|
||||||
}
|
|
||||||
|
|
||||||
$shouldReplace = [];
|
|
||||||
|
|
||||||
foreach ($replace as $key => $value) {
|
|
||||||
$shouldReplace[':' . Str::ucfirst($key ?? '')] = Str::ucfirst($value ?? '');
|
|
||||||
$shouldReplace[':' . Str::upper($key ?? '')] = Str::upper($value ?? '');
|
|
||||||
$shouldReplace[':' . $key] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return strtr($line, $shouldReplace);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add translation lines to the given locale.
|
|
||||||
*
|
|
||||||
* @param array $lines
|
|
||||||
* @param string $locale
|
|
||||||
* @param string $namespace
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function addLines(array $lines, $locale, $namespace = '*')
|
|
||||||
{
|
|
||||||
foreach ($lines as $key => $value) {
|
|
||||||
[$group, $item] = explode('.', $key, 2);
|
|
||||||
|
|
||||||
Arr::set($this->loaded, "$namespace.$group.$locale.$item", $value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load the specified language group.
|
|
||||||
*
|
|
||||||
* @param string $namespace
|
|
||||||
* @param string $group
|
|
||||||
* @param string $locale
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function load($namespace, $group, $locale)
|
|
||||||
{
|
|
||||||
if ($this->isLoaded($namespace, $group, $locale)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The loader is responsible for returning the array of language lines for the
|
|
||||||
// given namespace, group, and locale. We'll set the lines in this array of
|
|
||||||
// lines that have already been loaded so that we can easily access them.
|
|
||||||
$lines = $this->loader->load($locale, $group, $namespace);
|
|
||||||
|
|
||||||
$this->loaded[$namespace][$group][$locale] = $lines;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if the given group has been loaded.
|
|
||||||
*
|
|
||||||
* @param string $namespace
|
|
||||||
* @param string $group
|
|
||||||
* @param string $locale
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
protected function isLoaded($namespace, $group, $locale)
|
|
||||||
{
|
|
||||||
return isset($this->loaded[$namespace][$group][$locale]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a new namespace to the loader.
|
|
||||||
*
|
|
||||||
* @param string $namespace
|
|
||||||
* @param string $hint
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function addNamespace($namespace, $hint)
|
|
||||||
{
|
|
||||||
$this->loader->addNamespace($namespace, $hint);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a new JSON path to the loader.
|
|
||||||
*
|
|
||||||
* @param string $path
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function addJsonPath($path)
|
|
||||||
{
|
|
||||||
$this->loader->addJsonPath($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse a key into namespace, group, and item.
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function parseKey($key)
|
|
||||||
{
|
|
||||||
$segments = parent::parseKey($key);
|
|
||||||
|
|
||||||
if (is_null($segments[0])) {
|
|
||||||
$segments[0] = '*';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $segments;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the array of locales to be checked.
|
|
||||||
*
|
|
||||||
* @param string|null $locale
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
protected function localeArray($locale)
|
|
||||||
{
|
|
||||||
return array_filter([$locale ?: $this->locale, $this->fallback]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the message selector instance.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Translation\MessageSelector
|
|
||||||
*/
|
|
||||||
public function getSelector()
|
|
||||||
{
|
|
||||||
if (!isset($this->selector)) {
|
|
||||||
$this->selector = new MessageSelector;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->selector;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the message selector instance.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Translation\MessageSelector $selector
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setSelector(MessageSelector $selector)
|
|
||||||
{
|
|
||||||
$this->selector = $selector;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the language line loader implementation.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Contracts\Translation\Loader
|
|
||||||
*/
|
|
||||||
public function getLoader()
|
|
||||||
{
|
|
||||||
return $this->loader;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the default locale being used.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function locale()
|
|
||||||
{
|
|
||||||
return $this->getLocale();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the default locale being used.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getLocale()
|
|
||||||
{
|
|
||||||
return $this->locale;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the default locale.
|
|
||||||
*
|
|
||||||
* @param string $locale
|
|
||||||
* @return void
|
|
||||||
*
|
|
||||||
* @throws \InvalidArgumentException
|
|
||||||
*/
|
|
||||||
public function setLocale($locale)
|
|
||||||
{
|
|
||||||
if (Str::contains($locale, ['/', '\\'])) {
|
|
||||||
throw new InvalidArgumentException('Invalid characters present in locale.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->locale = $locale;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the fallback locale being used.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getFallback()
|
|
||||||
{
|
|
||||||
return $this->fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the fallback locale being used.
|
|
||||||
*
|
|
||||||
* @param string $fallback
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setFallback($fallback)
|
|
||||||
{
|
|
||||||
$this->fallback = $fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the loaded translation groups.
|
|
||||||
*
|
|
||||||
* @param array $loaded
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setLoaded(array $loaded)
|
|
||||||
{
|
|
||||||
$this->loaded = $loaded;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
use Anomaly\Streams\Platform\Event\Booted;
|
use Anomaly\Streams\Platform\Event\Booted;
|
||||||
use App\Lang\Loader;
|
use App\Lang\Loader;
|
||||||
use App\Lang\Translator;
|
use Illuminate\Translation\Translator;
|
||||||
|
|
||||||
class Translations
|
class Translations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
use Anomaly\Streams\Platform\Notification\Message\MailMessage;
|
use Anomaly\Streams\Platform\Notification\Message\MailMessage;
|
||||||
use Anomaly\UsersModule\User\Contract\UserInterface;
|
use Anomaly\UsersModule\User\Contract\UserInterface;
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
||||||
use Illuminate\Notifications\Notification;
|
use Illuminate\Notifications\Notification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,11 +11,8 @@ use Illuminate\Notifications\Notification;
|
|||||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||||
*/
|
*/
|
||||||
class ActivateYourAccount extends Notification implements ShouldQueue
|
class ActivateYourAccount extends Notification
|
||||||
{
|
{
|
||||||
|
|
||||||
use Queueable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redirect here after activating.
|
* Redirect here after activating.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
use Anomaly\Streams\Platform\Notification\Message\MailMessage;
|
use Anomaly\Streams\Platform\Notification\Message\MailMessage;
|
||||||
use Anomaly\UsersModule\User\Contract\UserInterface;
|
use Anomaly\UsersModule\User\Contract\UserInterface;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
||||||
use Illuminate\Notifications\Notification;
|
use Illuminate\Notifications\Notification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,11 +12,9 @@ use Illuminate\Notifications\Notification;
|
|||||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||||
*/
|
*/
|
||||||
class ResetYourPassword extends Notification implements ShouldQueue
|
class ResetYourPassword extends Notification
|
||||||
{
|
{
|
||||||
|
|
||||||
use Queueable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redirect here after activating.
|
* Redirect here after activating.
|
||||||
*
|
*
|
||||||
|
|||||||
46
build.xml
46
build.xml
@ -1,46 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<project name="Streams" default="dist">
|
|
||||||
|
|
||||||
<!-- ============================================ -->
|
|
||||||
<!-- Target: prepare -->
|
|
||||||
<!-- ============================================ -->
|
|
||||||
<target name="prepare">
|
|
||||||
|
|
||||||
<echo msg="Deleting directory ./build"/>
|
|
||||||
<delete dir="build"/>
|
|
||||||
|
|
||||||
<echo msg="Making directory ./build"/>
|
|
||||||
<mkdir dir="./build"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ============================================ -->
|
|
||||||
<!-- Target: build -->
|
|
||||||
<!-- ============================================ -->
|
|
||||||
<target name="build" depends="prepare">
|
|
||||||
<echo msg="Copying files to build directory..."/>
|
|
||||||
|
|
||||||
<echo msg="Copying ./ to ./build directory..."/>
|
|
||||||
<copy todir="./build">
|
|
||||||
<fileset dir="./">
|
|
||||||
<include name="**"/>
|
|
||||||
<exclude name=".git/"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ============================================ -->
|
|
||||||
<!-- (DEFAULT) Target: dist -->
|
|
||||||
<!-- ============================================ -->
|
|
||||||
<target name="dist" depends="build">
|
|
||||||
<echo msg="Creating archive..."/>
|
|
||||||
|
|
||||||
<tar destfile="./build/build.tar.gz" compression="gzip">
|
|
||||||
<fileset dir="./build">
|
|
||||||
<include name="*"/>
|
|
||||||
</fileset>
|
|
||||||
</tar>
|
|
||||||
|
|
||||||
<echo msg="Files copied and compressed in build directory OK!"/>
|
|
||||||
</target>
|
|
||||||
</project>
|
|
||||||
@ -57,9 +57,7 @@
|
|||||||
"anomaly/navigation-module": "~2.4.0",
|
"anomaly/navigation-module": "~2.4.0",
|
||||||
"anomaly/dashboard-module": "~2.2.0",
|
"anomaly/dashboard-module": "~2.2.0",
|
||||||
"anomaly/redirects-module": "~2.3.0",
|
"anomaly/redirects-module": "~2.3.0",
|
||||||
"anomaly/variables-module": "~2.4.0",
|
|
||||||
"anomaly/settings-module": "~2.4.0",
|
"anomaly/settings-module": "~2.4.0",
|
||||||
"anomaly/blocks-module": "~1.3.0",
|
|
||||||
"anomaly/search-module": "~3.0.0",
|
"anomaly/search-module": "~3.0.0",
|
||||||
"anomaly/users-module": "~2.5.0",
|
"anomaly/users-module": "~2.5.0",
|
||||||
"anomaly/pages-module": "~2.6.0",
|
"anomaly/pages-module": "~2.6.0",
|
||||||
@ -74,13 +72,10 @@
|
|||||||
"visiosoft/integer-field_type": "~2.1.0",
|
"visiosoft/integer-field_type": "~2.1.0",
|
||||||
"visiosoft/list-field_type": "*",
|
"visiosoft/list-field_type": "*",
|
||||||
"visiosoft/addblock-extension": "^1.1",
|
"visiosoft/addblock-extension": "^1.1",
|
||||||
"maatwebsite/excel": "*",
|
|
||||||
"google/recaptcha": "1.2.*",
|
"google/recaptcha": "1.2.*",
|
||||||
"sentry/sentry-laravel": "2.3.1",
|
"sentry/sentry-laravel": "2.3.1",
|
||||||
"composer/composer": "2.*",
|
"composer/composer": "2.*",
|
||||||
"visiosoft/composer-merge-plugin": "2.*",
|
"visiosoft/composer-merge-plugin": "2.*",
|
||||||
"pusher/pusher-php-server": "^5.0",
|
|
||||||
"simplepie/simplepie": "^1.5.0",
|
|
||||||
"guzzlehttp/guzzle": "^7.3",
|
"guzzlehttp/guzzle": "^7.3",
|
||||||
"visiosoft/connect-module": "^1.0",
|
"visiosoft/connect-module": "^1.0",
|
||||||
"visiosoft/singlefile-field_type": "^1.0",
|
"visiosoft/singlefile-field_type": "^1.0",
|
||||||
@ -95,7 +90,6 @@
|
|||||||
"visiosoft/advs-module": "^1.0",
|
"visiosoft/advs-module": "^1.0",
|
||||||
"visiosoft/json-field_type": "^1.0",
|
"visiosoft/json-field_type": "^1.0",
|
||||||
"visiosoft/language_switcher-plugin": "^1.0",
|
"visiosoft/language_switcher-plugin": "^1.0",
|
||||||
"fruitcake/laravel-cors": "^2.0",
|
|
||||||
"visiosoft/global_helper-extension": "*"
|
"visiosoft/global_helper-extension": "*"
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
@ -105,9 +99,7 @@
|
|||||||
"filp/whoops": "~2.0",
|
"filp/whoops": "~2.0",
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
"symfony/css-selector": "3.1.*",
|
"symfony/css-selector": "3.1.*",
|
||||||
"symfony/dom-crawler": "3.1.*",
|
"symfony/dom-crawler": "3.1.*"
|
||||||
"anomaly/installer-module": "~2.4.0",
|
|
||||||
"laravel/sail": "^1.14"
|
|
||||||
},
|
},
|
||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -78,7 +78,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', '/'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@ -15,7 +15,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('BROADCAST_DRIVER', 'pusher'),
|
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@ -16,11 +16,6 @@ INSERT INTO `{application_reference}_settings_settings` (`created_at`, `created_
|
|||||||
('2019-07-15 06:48:46', 1, '2019-07-15 06:53:05', 1, 'streams::enabled_locales', 'a:11:{i:0;s:2:\"en\";i:1;s:2:\"fa\";i:2;s:2:\"ar\";i:3;s:2:\"el\";i:4;s:2:\"es\";i:5;s:2:\"fr\";i:6;s:2:\"it\";i:7;s:2:\"nl\";i:8;s:2:\"pt\";i:9;s:2:\"ru\";i:10;s:2:\"tr\";}'),
|
('2019-07-15 06:48:46', 1, '2019-07-15 06:53:05', 1, 'streams::enabled_locales', 'a:11:{i:0;s:2:\"en\";i:1;s:2:\"fa\";i:2;s:2:\"ar\";i:3;s:2:\"el\";i:4;s:2:\"es\";i:5;s:2:\"fr\";i:6;s:2:\"it\";i:7;s:2:\"nl\";i:8;s:2:\"pt\";i:9;s:2:\"ru\";i:10;s:2:\"tr\";}'),
|
||||||
('2020-09-25 11:10:13', 1, '2020-09-25 11:10:13', 1, 'visiosoft.module.advs::latest-limit', '24'),
|
('2020-09-25 11:10:13', 1, '2020-09-25 11:10:13', 1, 'visiosoft.module.advs::latest-limit', '24'),
|
||||||
('2020-09-25 11:10:14', 1, '2020-09-25 11:10:14', 1, 'visiosoft.module.advs::popular_ads_limit', '15'),
|
('2020-09-25 11:10:14', 1, '2020-09-25 11:10:14', 1, 'visiosoft.module.advs::popular_ads_limit', '15'),
|
||||||
('2020-10-01 10:12:38', 1, '2020-10-01 10:12:38', 1, 'visiosoft.theme.sahibinden::banner_web', '462'),
|
|
||||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:22:19', 1, 'visiosoft.theme.sahibinden::home_bottom', '<p><img alt=\"Home bottom\" src=\"/files/images/home_bottom.jpg\"></p>'),
|
|
||||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:11:10', 1, 'visiosoft.theme.sahibinden::home_bottom_left_categories', '<p><img src=\"/files/images/home-bottom-left-categories.jpg\"></p>'),
|
|
||||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:11:10', 1, 'visiosoft.theme.sahibinden::home_top_latestAds', '<p><img src=\"/files/images/home-top-latestads.jpg\"></p>'),
|
|
||||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:11:10', 1, 'visiosoft.theme.sahibinden::home_bottom_latestAds', '<p><img alt=\"Home bottom latestads\" src=\"/files/images/home-bottom-latestads.jpg\"></p>'),
|
|
||||||
('2020-11-12 06:58:45', 1, '2020-11-16 14:25:22', 1, 'streams::mail_driver', 'log')
|
('2020-11-12 06:58:45', 1, '2020-11-16 14:25:22', 1, 'streams::mail_driver', 'log')
|
||||||
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `sort_order` = VALUES(`sort_order`), `created_at` = VALUES(`created_at`), `created_by_id` = VALUES(`created_by_id`), `updated_at` = VALUES(`updated_at`), `updated_by_id` = VALUES(`updated_by_id`), `key` = VALUES(`key`), `value` = VALUES(`value`);
|
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `sort_order` = VALUES(`sort_order`), `created_at` = VALUES(`created_at`), `created_by_id` = VALUES(`created_by_id`), `updated_at` = VALUES(`updated_at`), `updated_by_id` = VALUES(`updated_by_id`), `key` = VALUES(`key`), `value` = VALUES(`value`);
|
||||||
|
|
||||||
|
|||||||
@ -1,82 +1,88 @@
|
|||||||
# For more information: https://laravel.com/docs/sail
|
|
||||||
version: '3'
|
|
||||||
services:
|
|
||||||
laravel.test:
|
|
||||||
build:
|
|
||||||
context: ./docker/7.4
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
args:
|
|
||||||
WWWGROUP: '${WWWGROUP}'
|
|
||||||
image: sail-7.4/openclassify
|
|
||||||
extra_hosts:
|
|
||||||
- 'host.docker.internal:host-gateway'
|
|
||||||
ports:
|
|
||||||
- '${APP_PORT:-80}:80'
|
|
||||||
- '${HMR_PORT:-8080}:8080'
|
|
||||||
environment:
|
|
||||||
WWWUSER: '${WWWUSER}'
|
|
||||||
LARAVEL_SAIL: 1
|
|
||||||
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
|
|
||||||
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
|
|
||||||
volumes:
|
|
||||||
- '.:/var/www/html'
|
|
||||||
networks:
|
|
||||||
- sail
|
|
||||||
phpmyadmin:
|
|
||||||
image: 'phpmyadmin:latest'
|
|
||||||
ports:
|
|
||||||
- 8888:80
|
|
||||||
environment:
|
|
||||||
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
|
|
||||||
links:
|
|
||||||
- "mysql:db"
|
|
||||||
depends_on:
|
|
||||||
- mysql
|
|
||||||
networks:
|
|
||||||
- sail
|
|
||||||
mysql:
|
|
||||||
image: 'mysql/mysql-server:8.0'
|
|
||||||
ports:
|
|
||||||
- '${FORWARD_DB_PORT:-3306}:3306'
|
|
||||||
environment:
|
|
||||||
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
|
|
||||||
MYSQL_ROOT_HOST: "%"
|
|
||||||
MYSQL_DATABASE: '${DB_DATABASE}'
|
|
||||||
MYSQL_USER: '${DB_USERNAME}'
|
|
||||||
MYSQL_PASSWORD: '${DB_PASSWORD}'
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
|
||||||
volumes:
|
|
||||||
- 'sail-mysql:/var/lib/mysql'
|
|
||||||
- './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
|
|
||||||
networks:
|
|
||||||
- sail
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
|
|
||||||
retries: 3
|
|
||||||
timeout: 5s
|
|
||||||
redis:
|
|
||||||
image: 'redis:alpine'
|
|
||||||
ports:
|
|
||||||
- '${FORWARD_REDIS_PORT:-6379}:6379'
|
|
||||||
volumes:
|
|
||||||
- 'sail-redis:/data'
|
|
||||||
networks:
|
|
||||||
- sail
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
|
||||||
retries: 3
|
|
||||||
timeout: 5s
|
|
||||||
memcached:
|
|
||||||
image: 'memcached:alpine'
|
|
||||||
ports:
|
|
||||||
- '11211:11211'
|
|
||||||
networks:
|
|
||||||
- sail
|
|
||||||
networks:
|
|
||||||
sail:
|
|
||||||
driver: bridge
|
|
||||||
volumes:
|
volumes:
|
||||||
sail-mysql:
|
db-store:
|
||||||
driver: local
|
psysh-store:
|
||||||
sail-redis:
|
|
||||||
driver: local
|
configs:
|
||||||
|
db-config:
|
||||||
|
file: ./docker/mysql/my.cnf
|
||||||
|
|
||||||
|
services:
|
||||||
|
php:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/php/Dockerfile
|
||||||
|
target: ${APP_BUILD_TARGET:-development}
|
||||||
|
container_name: oc_php
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ./
|
||||||
|
target: /workspace
|
||||||
|
- type: volume
|
||||||
|
source: psysh-store
|
||||||
|
target: /root/.config/psysh
|
||||||
|
volume:
|
||||||
|
nocopy: true
|
||||||
|
depends_on:
|
||||||
|
database:
|
||||||
|
condition: service_healthy
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/nginx/Dockerfile
|
||||||
|
container_name: ${APP_NAME}_nginx
|
||||||
|
ports:
|
||||||
|
- target: 80
|
||||||
|
published: ${WEB_PUBLISHED_PORT:-80}
|
||||||
|
protocol: tcp
|
||||||
|
mode: host
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ./
|
||||||
|
target: /workspace
|
||||||
|
depends_on:
|
||||||
|
- php
|
||||||
|
- database
|
||||||
|
|
||||||
|
database:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/mysql/Dockerfile
|
||||||
|
command: --max_allowed_packet=32505856 # Set max_allowed_packet to 256M (or any other value)
|
||||||
|
ports:
|
||||||
|
- target: 3306
|
||||||
|
published: ${DB_PUBLISHED_PORT:-3306}
|
||||||
|
protocol: tcp
|
||||||
|
mode: host
|
||||||
|
configs:
|
||||||
|
- source: db-config
|
||||||
|
target: /etc/my.cnf
|
||||||
|
volumes:
|
||||||
|
- type: volume
|
||||||
|
source: db-store
|
||||||
|
target: /var/lib/mysql
|
||||||
|
volume:
|
||||||
|
nocopy: true
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE=${DB_DATABASE:-laravel}
|
||||||
|
- MYSQL_USER=${DB_USERNAME:-phper}
|
||||||
|
- MYSQL_PASSWORD=${DB_PASSWORD:-secret}
|
||||||
|
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD:-secret}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
|
phpmyadmin:
|
||||||
|
image: phpmyadmin/phpmyadmin:latest
|
||||||
|
ports:
|
||||||
|
- "8081:80"
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
environment:
|
||||||
|
PMA_USER: oc
|
||||||
|
PMA_PASSWORD: oc
|
||||||
|
PMA_HOSTS: database,localhost
|
||||||
|
UPLOAD_LIMIT: 10G
|
||||||
@ -1,2 +0,0 @@
|
|||||||
WWWGROUP=1000
|
|
||||||
WWWUSER=1000
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
FROM ubuntu:20.04
|
|
||||||
|
|
||||||
LABEL maintainer="Taylor Otwell"
|
|
||||||
|
|
||||||
ARG WWWGROUP
|
|
||||||
ARG NODE_VERSION=16
|
|
||||||
ARG POSTGRES_VERSION=14
|
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
ENV TZ=UTC
|
|
||||||
|
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 \
|
|
||||||
&& mkdir -p ~/.gnupg \
|
|
||||||
&& chmod 600 ~/.gnupg \
|
|
||||||
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
|
|
||||||
&& echo "keyserver hkp://keyserver.ubuntu.com:80" >> ~/.gnupg/dirmngr.conf \
|
|
||||||
&& gpg --recv-key 0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c \
|
|
||||||
&& gpg --export 0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c > /usr/share/keyrings/ppa_ondrej_php.gpg \
|
|
||||||
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y php7.4-cli php7.4-dev \
|
|
||||||
php7.4-pgsql php7.4-sqlite3 php7.4-gd \
|
|
||||||
php7.4-curl php7.4-memcached \
|
|
||||||
php7.4-imap php7.4-mysql php7.4-mbstring \
|
|
||||||
php7.4-xml php7.4-zip php7.4-bcmath php7.4-soap \
|
|
||||||
php7.4-intl php7.4-readline php7.4-pcov \
|
|
||||||
php7.4-msgpack php7.4-igbinary php7.4-ldap \
|
|
||||||
php7.4-redis php7.4-xdebug \
|
|
||||||
&& php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
|
|
||||||
&& curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
|
|
||||||
&& apt-get install -y nodejs \
|
|
||||||
&& npm install -g npm \
|
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null \
|
|
||||||
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
|
||||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
|
|
||||||
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y yarn \
|
|
||||||
&& apt-get install -y mysql-client \
|
|
||||||
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y cron \
|
|
||||||
&& apt-get -y autoremove \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php7.4
|
|
||||||
|
|
||||||
RUN groupadd --force -g $WWWGROUP sail
|
|
||||||
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
|
|
||||||
|
|
||||||
COPY start-container /usr/local/bin/start-container
|
|
||||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
||||||
COPY php.ini /etc/php/7.4/cli/conf.d/99-sail.ini
|
|
||||||
RUN chmod +x /usr/local/bin/start-container
|
|
||||||
|
|
||||||
COPY scheduler /etc/cron.d/scheduler
|
|
||||||
RUN chmod 0644 /etc/cron.d/scheduler
|
|
||||||
RUN crontab /etc/cron.d/scheduler
|
|
||||||
|
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
ENTRYPOINT ["start-container"]
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
[PHP]
|
|
||||||
post_max_size = 100M
|
|
||||||
upload_max_filesize = 100M
|
|
||||||
variables_order = EGPCS
|
|
||||||
@ -1 +0,0 @@
|
|||||||
* * * * * root cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [ ! -z "$WWWUSER" ]; then
|
|
||||||
usermod -u $WWWUSER sail
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /.composer ]; then
|
|
||||||
mkdir /.composer
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R ugo+rw /.composer
|
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
exec gosu $WWWUSER "$@"
|
|
||||||
else
|
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
|
||||||
fi
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
user=root
|
|
||||||
logfile=/var/log/supervisor/supervisord.log
|
|
||||||
pidfile=/var/run/supervisord.pid
|
|
||||||
|
|
||||||
[program:php]
|
|
||||||
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80
|
|
||||||
user=sail
|
|
||||||
environment=LARAVEL_SAIL="1"
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
|
|
||||||
[include]
|
|
||||||
files=/var/www/html/supervisord/*.conf
|
|
||||||
7
docker/mysql/Dockerfile
Normal file
7
docker/mysql/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM mysql/mysql-server:8.0
|
||||||
|
|
||||||
|
ENV TZ=UTC
|
||||||
|
|
||||||
|
RUN mkdir /var/log/mysql \
|
||||||
|
&& chown mysql:mysql $_ \
|
||||||
|
&& chmod 777 $_
|
||||||
37
docker/mysql/my.cnf
Normal file
37
docker/mysql/my.cnf
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[mysqld]
|
||||||
|
# default
|
||||||
|
skip-host-cache
|
||||||
|
skip-name-resolve
|
||||||
|
datadir = /var/lib/mysql
|
||||||
|
socket = /var/lib/mysql/mysql.sock
|
||||||
|
secure-file-priv = /var/lib/mysql-files
|
||||||
|
user = mysql
|
||||||
|
|
||||||
|
pid-file = /var/run/mysqld/mysqld.pid
|
||||||
|
|
||||||
|
# character set / collation
|
||||||
|
character_set_server = utf8mb4
|
||||||
|
collation_server = utf8mb4_0900_ai_ci
|
||||||
|
|
||||||
|
# timezone
|
||||||
|
default-time-zone = SYSTEM
|
||||||
|
log_timestamps = SYSTEM
|
||||||
|
|
||||||
|
# Error Log
|
||||||
|
log-error = /var/log/mysql/mysql-error.log
|
||||||
|
|
||||||
|
# Slow Query Log
|
||||||
|
slow_query_log = 1
|
||||||
|
slow_query_log_file = /var/log/mysql/mysql-slow.log
|
||||||
|
long_query_time = 1.0
|
||||||
|
log_queries_not_using_indexes = 0
|
||||||
|
|
||||||
|
# General Log
|
||||||
|
general_log = 1
|
||||||
|
general_log_file = /var/log/mysql/mysql-general.log
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
default-character-set = utf8mb4
|
||||||
|
|
||||||
|
[client]
|
||||||
|
default-character-set = utf8mb4
|
||||||
9
docker/nginx/Dockerfile
Normal file
9
docker/nginx/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM nginx:1.25
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
ENV TZ=UTC
|
||||||
|
|
||||||
|
COPY ./docker/nginx/*.conf /etc/nginx/conf.d/
|
||||||
|
|
||||||
|
|
||||||
35
docker/nginx/default.conf
Normal file
35
docker/nginx/default.conf
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
access_log /dev/stdout main;
|
||||||
|
error_log /dev/stderr warn;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
root /workspace/public;
|
||||||
|
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||||||
|
location = /robots.txt { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
error_page 404 /index.php;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known).* {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
}
|
||||||
69
docker/php/Dockerfile
Normal file
69
docker/php/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
FROM php:8.2-fpm-bullseye AS base
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# timezone environment
|
||||||
|
ENV TZ=UTC \
|
||||||
|
# locale
|
||||||
|
LANG=en_US.UTF-8 \
|
||||||
|
LANGUAGE=en_US:en \
|
||||||
|
LC_ALL=en_US.UTF-8 \
|
||||||
|
# composer environment
|
||||||
|
COMPOSER_ALLOW_SUPERUSER=1 \
|
||||||
|
COMPOSER_HOME=/composer
|
||||||
|
|
||||||
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install --no-install-recommends \
|
||||||
|
locales \
|
||||||
|
git \
|
||||||
|
unzip \
|
||||||
|
libzip-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libcurl4-gnutls-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libpng-dev \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& locale-gen en_US.UTF-8 \
|
||||||
|
&& localedef -f UTF-8 -i en_US en_US.UTF-8 \
|
||||||
|
&& docker-php-ext-install \
|
||||||
|
intl \
|
||||||
|
pdo_mysql \
|
||||||
|
zip \
|
||||||
|
bcmath \
|
||||||
|
&& composer config -g process-timeout 3600 \
|
||||||
|
&& composer config -g repos.packagist composer https://packagist.org
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
|
||||||
|
RUN docker-php-ext-install gd
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
#RUN ["chmod", "+x", "./docker/php/entrypoint.sh"]
|
||||||
|
CMD ["docker/php/entrypoint.sh"]
|
||||||
|
|
||||||
|
FROM base AS development
|
||||||
|
|
||||||
|
COPY ./docker/php/php.development.ini /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
FROM development AS development-xdebug
|
||||||
|
|
||||||
|
RUN pecl install xdebug && \
|
||||||
|
docker-php-ext-enable xdebug
|
||||||
|
|
||||||
|
COPY ./docker/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
|
||||||
|
FROM base AS deploy
|
||||||
|
|
||||||
|
COPY ./docker/php/php.deploy.ini /usr/local/etc/php/php.ini
|
||||||
|
COPY ./ /workspace
|
||||||
|
|
||||||
|
RUN composer install -q -n --no-ansi --no-dev --no-scripts --no-progress --prefer-dist \
|
||||||
|
&& chmod -R 777 storage bootstrap/cache \
|
||||||
|
&& php artisan optimize:clear \
|
||||||
|
&& php artisan optimize
|
||||||
29
docker/php/entrypoint.sh
Executable file
29
docker/php/entrypoint.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -f "vendor/autoload.php" ]; then
|
||||||
|
composer install --no-progress --no-interaction
|
||||||
|
else
|
||||||
|
echo "composer. nothing to do."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f ".env" ]; then
|
||||||
|
echo "Creating env file for env from env-sail"
|
||||||
|
cp .env-sail .env
|
||||||
|
else
|
||||||
|
echo "env file exists. nothing to do."
|
||||||
|
fi
|
||||||
|
|
||||||
|
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||||
|
if [[ "$line" == "INSTALLED="* ]]; then
|
||||||
|
installed="${line#*=}"
|
||||||
|
installed=$(echo "$installed" | tr -d '[:space:]' | tr -d '[:punct:]') # Boşlukları ve özel karakterleri sil
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done < .env
|
||||||
|
|
||||||
|
if [ "$installed" = "false" ]; then
|
||||||
|
echo ".env installed is false starting installing"
|
||||||
|
php artisan install --ready
|
||||||
|
fi
|
||||||
|
|
||||||
|
php-fpm -R
|
||||||
11
docker/php/opcache.ini
Normal file
11
docker/php/opcache.ini
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[opcache]
|
||||||
|
opcache.enable=1
|
||||||
|
; 0 means it will check on every request
|
||||||
|
; 0 is irrelevant if opcache.validate_timestamps=0 which is desirable in production
|
||||||
|
opcache.revalidate_freq=0
|
||||||
|
opcache.validate_timestamps=1
|
||||||
|
opcache.max_accelerated_files=10000
|
||||||
|
opcache.memory_consumption=192
|
||||||
|
opcache.max_wasted_percentage=10
|
||||||
|
opcache.interned_strings_buffer=16
|
||||||
|
opcache.fast_shutdown=1
|
||||||
25
docker/php/php.deploy.ini
Normal file
25
docker/php/php.deploy.ini
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
zend.exception_ignore_args = off
|
||||||
|
expose_php = off
|
||||||
|
max_execution_time = 30
|
||||||
|
max_input_vars = 1000
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
post_max_size = 128M
|
||||||
|
memory_limit = 256M
|
||||||
|
error_reporting = E_ALL
|
||||||
|
display_errors = off
|
||||||
|
display_startup_errors = off
|
||||||
|
log_errors = on
|
||||||
|
error_log = /dev/stderr
|
||||||
|
default_charset = UTF-8
|
||||||
|
|
||||||
|
[Date]
|
||||||
|
date.timezone = ${TZ}
|
||||||
|
|
||||||
|
[mysqlnd]
|
||||||
|
mysqlnd.collect_memory_statistics = off
|
||||||
|
|
||||||
|
[Assertion]
|
||||||
|
zend.assertions = -1
|
||||||
|
|
||||||
|
[mbstring]
|
||||||
|
mbstring.language = Neutral
|
||||||
25
docker/php/php.development.ini
Normal file
25
docker/php/php.development.ini
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
zend.exception_ignore_args = off
|
||||||
|
expose_php = on
|
||||||
|
max_execution_time = 30
|
||||||
|
max_input_vars = 1000
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
post_max_size = 128M
|
||||||
|
memory_limit = 256M
|
||||||
|
error_reporting = E_ALL
|
||||||
|
display_errors = on
|
||||||
|
display_startup_errors = on
|
||||||
|
log_errors = on
|
||||||
|
error_log = /dev/stderr
|
||||||
|
default_charset = UTF-8
|
||||||
|
|
||||||
|
[Date]
|
||||||
|
date.timezone = ${TZ}
|
||||||
|
|
||||||
|
[mysqlnd]
|
||||||
|
mysqlnd.collect_memory_statistics = on
|
||||||
|
|
||||||
|
[Assertion]
|
||||||
|
zend.assertions = 1
|
||||||
|
|
||||||
|
[mbstring]
|
||||||
|
mbstring.language = Neutral
|
||||||
7
docker/php/xdebug.ini
Normal file
7
docker/php/xdebug.ini
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[xdebug]
|
||||||
|
xdebug.mode = debug
|
||||||
|
xdebug.start_with_request = yes
|
||||||
|
xdebug.client_host = host.docker.internal
|
||||||
|
xdebug.client_port = 9003
|
||||||
|
xdebug.log = /tmp/xdebug.log
|
||||||
|
xdebug.idekey = "PHPSTORM"
|
||||||
128
docs/CONTRIBUTING.md
Normal file
128
docs/CONTRIBUTING.md
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
# Contribution Guide
|
||||||
|
|
||||||
|
It's been often said that programming is part art, part science - that because lots of times there's no single, simple solution to a problem; or if there is, we might not know about it. There's also an infamous joke that if there are *n* developers in the room, then there are *n+1* opinions on how things should be done.
|
||||||
|
|
||||||
|
### The most important thing
|
||||||
|
|
||||||
|
**The code has to work.** Unless you open a PR as a work in progress, the code should be built and tested on a device or emulator. Having people review your code is one thing, but you should not expect them to also *test* the code for you.
|
||||||
|
|
||||||
|
### Context
|
||||||
|
|
||||||
|
Some of those might be more urgent than the others, and sometimes you might be under pressure to ship as soon as possible so the code might not be perfect or there won't be any tests or code might not be extendable. **That's ok.**
|
||||||
|
|
||||||
|
## Everyone
|
||||||
|
|
||||||
|
* There is no perfect code: good enough is usually good enough. That being said, try to keep the number of WTFs per minute to a minimum.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* Accept that many programming decisions are opinions. Discuss tradeoffs, which you prefer, and reach a resolution quickly.
|
||||||
|
* Ask for clarification. ("I didn't understand. Can you clarify?")
|
||||||
|
* Offer clarification, explain the decisions you made to reach a solution in question.
|
||||||
|
* Avoid using terms that could be seen as referring to personal traits. ("dumb", "stupid"). Assume everyone is intelligent and well-meaning.
|
||||||
|
* Be humble. ("I'm not sure - let's look it up.")
|
||||||
|
* Don't use hyperbole. ("always", "never", "endlessly", "nothing") Don't use sarcasm.
|
||||||
|
* Remember that you're both on the same side - the goal is to make the code better. Understand that sometimes your ideas will be overruled. Even if you do turn out to be right, don't take revenge or say, "I told you so".
|
||||||
|
* Talk synchronously (e.g. chat, screensharing, in person) if there are too many "I didn't understand" or "Alternative solution:" comments. Pull requests should not be the place for long discussions, architectural or otherwise.
|
||||||
|
* Put notes on what's missing or could be improved in the PR description or comments. You can also create an issue with discussion points and possible problems or things to do and discuss it offline.
|
||||||
|
|
||||||
|
## As a code submitter
|
||||||
|
|
||||||
|
* PRs should be about one thing. If you do multiple things in one PR, it's hard to review. If you're fixing stuff as you go, you might want to make atomic commits and then cherry-pick those commits into separate branches, leaving the PR clean.
|
||||||
|
* Try to keep the PRs small. There has been some research to indicate that beyond 400 LOC the ability to detect defects diminishes. (We're talking about LOC proper, unit tests and layouts don't count)
|
||||||
|
* Having a PR description is useful. Additionally, you can also link to the card on Trello.
|
||||||
|
* Ideally, the PR should be finished when submitted. If the PR is work in progress, add (WIP) or [WIP] to the title.
|
||||||
|
* You should have tests that at least cover the logic, and ideally also cover the input/output parameters and methods. (depends on context)
|
||||||
|
|
||||||
|
## As a reviewer
|
||||||
|
|
||||||
|
* Reviewing code is part of a normal workday. You should check for open/updated PRs at least once a day.
|
||||||
|
* Ask, don’t tell. (“What do you think about trying…?” rather than “Don’t do…”)
|
||||||
|
* Offer ways to simplify or improve code.
|
||||||
|
* Code beautification and refactoring ought to be tasks in the next sprint, except for obvious and easy-to-fix things.
|
||||||
|
* Communicate which ideas you feel strongly about and those you don't. Explain your reasons why code should be changed. (Not in line with the style guide? A personal preference?)
|
||||||
|
* If you disagree strongly, consider giving it a few minutes before responding; think before you react.
|
||||||
|
* Offer alternative implementations, but assume the author already considered them. ("What do you think about using a custom validator here?")
|
||||||
|
* If discussions turn too theoretical or touch big architectural questions, move the discussion offline. In the meantime, let the author make the final decision on alternative implementations.
|
||||||
|
* Don't keep the code hostage. Keep in mind the context and the most important thing - does it work?
|
||||||
|
|
||||||
|
## Readability and Cleanliness
|
||||||
|
|
||||||
|
The first step is to make sure that your PHP code is clean and readable so that both you and other developers can easily understand it.
|
||||||
|
|
||||||
|
Make sure to consider the following issues:
|
||||||
|
|
||||||
|
* Is the code formatting written in the same style as the rest of the project?
|
||||||
|
* Is the code well-described with comments or other documentation?
|
||||||
|
* Is it easy to discern the purpose of a given PHP function or class?
|
||||||
|
* Does the code throw exceptions or display appropriate error messages when something goes wrong?
|
||||||
|
* Are any variable, function, or file names unclear or inconsistent?
|
||||||
|
* Are there still large blocks of code commented out that should be deleted?
|
||||||
|
* Are there duplicate sections of code that can be removed or condensed?
|
||||||
|
* Can large files be refactored or broken down into smaller components that are easier to comprehend?
|
||||||
|
|
||||||
|
|
||||||
|
# Task list to Check
|
||||||
|
|
||||||
|
## General
|
||||||
|
- [ ] The code works
|
||||||
|
- [ ] The code is easy to understand
|
||||||
|
- [ ] Follows coding conventions
|
||||||
|
- [ ] Names are simple and if possible short
|
||||||
|
- [ ] Names are spelt correctly
|
||||||
|
- [ ] Names contain units where applicable
|
||||||
|
- [ ] There are no usages of [magic numbers](http://c2.com/cgi/wiki?MagicNumber)
|
||||||
|
- [ ] No hard coded constants that could possibly change in the future
|
||||||
|
- [ ] All variables are in the smallest scope possible
|
||||||
|
- [ ] There is no commented out code
|
||||||
|
- [ ] There is no dead code (inaccessible at Runtime)
|
||||||
|
- [ ] No code that can be replaced with library functions
|
||||||
|
- [ ] Variables are not accidentally used with null values
|
||||||
|
- [ ] Variables are immutable where possible
|
||||||
|
- [ ] Code is not repeated or duplicated
|
||||||
|
- [ ] No complex/long boolean expressions
|
||||||
|
- [ ] No negatively named boolean variables
|
||||||
|
- [ ] No empty blocks of code
|
||||||
|
- [ ] Ideal data structures are used
|
||||||
|
- [ ] Constructors do not accept null/none values
|
||||||
|
- [ ] Catch clauses are fine grained and catch specific exceptions
|
||||||
|
- [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
|
||||||
|
- [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
|
||||||
|
- [ ] == operator and === (and its inverse !==) are not mixed up
|
||||||
|
- [ ] Floating point numbers are not compared for equality
|
||||||
|
- [ ] Loops have a set length and correct termination conditions
|
||||||
|
- [ ] Blocks of code inside loops are as small as possible
|
||||||
|
- [ ] No methods with boolean parameters
|
||||||
|
- [ ] No object exists longer than necessary
|
||||||
|
- [ ] No memory leaks
|
||||||
|
- [ ] Code is unit testable
|
||||||
|
- [ ] Test cases are written wherever possible
|
||||||
|
- [ ] Methods return early without compromising code readability
|
||||||
|
- [ ] Performance is considered
|
||||||
|
- [ ] Loop iteration and off by one are taken care of
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
- [ ] [Law of Demeter](https://en.wikipedia.org/wiki/Law_of_Demeter) is not violated
|
||||||
|
- [ ] A class should have only a single responsibility (i.e. only one potential change in the software's specification should be able to affect the specification of the class)
|
||||||
|
- [ ] Classes, modules, functions, etc. should be open for extension, but closed for modification
|
||||||
|
- [ ] Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program
|
||||||
|
- [ ] Many client-specific interfaces are better than one general-purpose interface.
|
||||||
|
- [ ] Depend upon Abstractions. Do not depend upon concretions.
|
||||||
|
|
||||||
|
|
||||||
|
## Security
|
||||||
|
- [ ] All data inputs are checked (for the correct type, length/size, format, and range)
|
||||||
|
- [ ] Invalid parameter values handled such that exceptions are not thrown
|
||||||
|
- [ ] No sensitive information is logged or visible in a stacktrace
|
||||||
|
|
||||||
|
|
||||||
|
## Security Vulnerabilities
|
||||||
|
|
||||||
|
If you discover a security vulnerability, please send an e-mail to info@openclassify.com. All security vulnerabilities will be promptly addressed.
|
||||||
|
|
||||||
|
|
||||||
|
## Coding Style
|
||||||
|
|
||||||
|
Project follows the PSR-4, PSR-2 and PSR-1 coding standards. In addition to these standards, the following coding standards should be followed:
|
||||||
|
|
||||||
|
The class namespace declaration must be on the same line as <?php.
|
||||||
20
docs/LICENSE.md
Normal file
20
docs/LICENSE.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# The MIT License (MIT)
|
||||||
|
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
@ -1,5 +1,56 @@
|
|||||||
# CLI Commands
|
# CLI Commands
|
||||||
|
|
||||||
|
## Basics
|
||||||
|
|
||||||
|
### Addon & Module install
|
||||||
|
|
||||||
|
Install an addon.
|
||||||
|
|
||||||
|
The required `addon` argument must be an addon identifier like `anomaly.module.store`.
|
||||||
|
|
||||||
|
The `--seed` flag causes the addon to be seeded as well.
|
||||||
|
|
||||||
|
> Only **modules** and **extensions** are installable.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan addon:install anomaly.module.store --seed
|
||||||
|
```
|
||||||
|
|
||||||
|
### Install All modules and migrate
|
||||||
|
|
||||||
|
Clone modules & themes and run this command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan migrate --all-addons
|
||||||
|
```
|
||||||
|
|
||||||
|
### Seed for Themes
|
||||||
|
|
||||||
|
Like : php artisan db:seed --addon=visiosoft.theme.oc
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan db:seed --addon=visiosoft.theme.addon_name
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Run Command Inside Docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it oc_php php artisan addon:install anomaly.module.store --seed
|
||||||
|
```
|
||||||
|
|
||||||
|
### Composer set private repo
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer config repositories.repo-name composer https://abc.aaa.com
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Composer set username and password for repo
|
||||||
|
```bash
|
||||||
|
composer config http-basic.abc.aaa.com openclassify pass
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Asset Management
|
## Asset Management
|
||||||
|
|
||||||
@ -182,19 +233,7 @@ The `addon` slug is the `slug_formatted` name of the addon you are creating.
|
|||||||
php artisan make:addon anomaly.module.store
|
php artisan make:addon anomaly.module.store
|
||||||
```
|
```
|
||||||
|
|
||||||
### addon:install
|
|
||||||
|
|
||||||
Install an addon.
|
|
||||||
|
|
||||||
The required `addon` argument must be an addon identifier like `anomaly.module.store`.
|
|
||||||
|
|
||||||
The `--seed` flag causes the addon to be seeded as well.
|
|
||||||
|
|
||||||
> Only **modules** and **extensions** are installable.{.notice}
|
|
||||||
|
|
||||||
```bash
|
|
||||||
php artisan addon:install anomaly.module.store --seed
|
|
||||||
```
|
|
||||||
|
|
||||||
### addon:uninstall
|
### addon:uninstall
|
||||||
|
|
||||||
@ -231,3 +270,4 @@ Use the `--force` flag to overwrite the files should they already exist.
|
|||||||
```bash
|
```bash
|
||||||
php artisan addon:publish anomaly.module.store --force
|
php artisan addon:publish anomaly.module.store --force
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
84
docs/other-install-methods.md
Normal file
84
docs/other-install-methods.md
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
|
||||||
|
## Via Composer
|
||||||
|
|
||||||
|
> Do not create an `.env` file just yet - Installer will generate one for you.{.important}
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer create-project openclassify/openclassify
|
||||||
|
```
|
||||||
|
|
||||||
|
### Host Configuration
|
||||||
|
|
||||||
|
When you setup your web host be sure to point the web root to `public` directory. Just as you would a normal Laravel installation.
|
||||||
|
|
||||||
|
#### Alternate Directories for cPanel or Virtualmin
|
||||||
|
|
||||||
|
In some environments like cPanel or Virtualmin it may be difficult to use the `public` directory as the web root. In these cases we suggest symlinking the `public` directory to `public_html`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ln -s public public_html
|
||||||
|
```
|
||||||
|
|
||||||
|
You may also simply rename the `public` directory to `public_html`. Path hints will automatically use the correct path.
|
||||||
|
|
||||||
|
### Directory Permissions
|
||||||
|
|
||||||
|
After installing, you may need to configure some permissions in order to proceed.
|
||||||
|
Directories within the `storage`, `public/app`, and the `bootstrap/cache` directories should be writable by your web server.
|
||||||
|
If you are using the [Homestead](http://laravel.com/docs/homestead) virtual machine, these permissions should already be set.
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Running the Installation Wizard
|
||||||
|
|
||||||
|
After downloading and it's dependencies with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer install
|
||||||
|
```
|
||||||
|
you will need to install the software in order to get started.
|
||||||
|
By this time you should be able to visit your site's URL which will
|
||||||
|
redirect you to the installer: `http://yoursite.com/installer`
|
||||||
|
|
||||||
|
### Using the CLI Installer
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan install
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
You will be prompted for details in order to proceed with the installation process.
|
||||||
|
|
||||||
|
> You may need to run `ulimit -n 1024` before installing via CLI to temporarily increase your max open files limit.
|
||||||
|
|
||||||
|
#### Automating the CLI Installer
|
||||||
|
|
||||||
|
You can automate the installer by creating your own .env file with something like this:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_ENV=local
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_KEY=zfesbnTkXvooWVcsKMw2r4SmPVNGbFoS
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_DATABASE=workbench
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=root
|
||||||
|
APPLICATION_NAME=Default
|
||||||
|
APPLICATION_REFERENCE=default
|
||||||
|
APPLICATION_DOMAIN=localhost
|
||||||
|
ADMIN_EMAIL=info@openclassify.com
|
||||||
|
ADMIN_USERNAME=admin
|
||||||
|
ADMIN_PASSWORD=password
|
||||||
|
LOCALE=en
|
||||||
|
TIMEZONE=Turkey/Istanbul
|
||||||
|
```
|
||||||
|
> The APP_KEY must be exactly 32 characters in length.
|
||||||
|
|
||||||
|
Then run the installer and indicate that the system is ready to install:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan install --ready
|
||||||
|
```
|
||||||
10
install.sh
Normal file
10
install.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "================================================"
|
||||||
|
echo "----------------- Openclassify -----------------"
|
||||||
|
echo "----- Automated install script with Docker -----"
|
||||||
|
echo "================================================"
|
||||||
|
|
||||||
|
docker --version
|
||||||
|
cp .env-sail .env
|
||||||
|
docker compose up
|
||||||
@ -1,7 +0,0 @@
|
|||||||
location / {
|
|
||||||
try_files $uri @rewriteapp;
|
|
||||||
}
|
|
||||||
|
|
||||||
location @rewriteapp {
|
|
||||||
rewrite ^(.*)$ /index.php$1 last;
|
|
||||||
}
|
|
||||||
@ -13,8 +13,8 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'eager' => [
|
'eager' => [
|
||||||
'core/anomaly/settings-module',
|
'vendor/anomaly/settings-module',
|
||||||
'core/anomaly/preferences-module'
|
'vendor/anomaly/preferences-module',
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -28,8 +28,9 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'deferred' => [
|
'deferred' => [
|
||||||
'core/anomaly/pages-module',
|
'vendor/anomaly/pages-module',
|
||||||
'core/anomaly/redirects-module'
|
'vendor/anomaly/redirects-module',
|
||||||
|
'vendor/visiosoft/advs-module',
|
||||||
]
|
]
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
13
uninstall.sh
Normal file
13
uninstall.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "|| ## Openclassify ## || "
|
||||||
|
echo "|| Removing Bye bye || "
|
||||||
|
|
||||||
|
docker compose down -v
|
||||||
|
# TODO @fatihalp
|
||||||
|
|
||||||
|
# reinstall
|
||||||
|
docker compose build --no-cache
|
||||||
|
|
||||||
|
docker compose up --force-recreate
|
||||||
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
const mix = require('laravel-mix');
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Mix Asset Management
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Mix provides a clean, fluent API for defining some Webpack build steps
|
|
||||||
| for your Laravel applications. By default, we are compiling the CSS
|
|
||||||
| file for the application as well as bundling up all the JS files.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
mix.js('resources/assets/js/app.js', 'public/js')
|
|
||||||
.vue().version();
|
|
||||||
Loading…
Reference in New Issue
Block a user