Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 37 | All time: 10,956 This week: 57 |
Version | License | PHP version | Categories | |||
laravel-docker-elast 1.0.0 | The PHP License | 5 | PHP 5, Searching, Systems administration, L... |
This is a simple repo for practicing elasticsearch with laravel and docker.
Elasticsearch is an open-source, RESTful, distributed search and analytics engine built on Apache Lucene. Since the first version of Elasticsearch was released in 2010, it has quickly become the most popular search engine, and is commonly used for log analytics, full-text search, and operational intelligence use cases.
In this repo you will get how you will use elasticsearch with laravel and docker.
First you have to add elastic search image in docker-compose file.
For Example :
elasticsearch:
image: elasticsearch
ports:
- "9200:9200"
Before running docker compose you have to sure that docker memory size >= 4.0 GB. Otherwise, the elastic search will not run properly.
Now you have to update composer.json file.
"require": {
"elasticsearch/elasticsearch": "^5.2"
}
All the above things I have done in this repo. For running this project just follow the following step:
clone the repo
From the project directory run the following command:
composer update
Now increase docker memory size, restart docker and run the following commands
docker-compose build
docker-compose up -d
Now run the migration commmand:
php artisan migrate
Now you can brows the project and create post from this url
http://localhost:9000/posts/create
Now you can search using elastic search. In app elastic folder you will get elastic class. Here I have implement elastic client.
If you want to add demo data for Post then run the following command:
docker-compose exec php php artisan tinker
factory(App\Post::class, 50)->create();
Files (94) |
File | Role | Description | ||
---|---|---|---|---|
app (3 files, 5 directories) | ||||
bootstrap (1 file) | ||||
config (13 files) | ||||
database (3 directories) | ||||
docker (2 directories) | ||||
public (4 files, 2 directories) | ||||
resources (3 directories) | ||||
routes (4 files) | ||||
tests (2 files, 2 directories) | ||||
.env.example | Data | Auxiliary data | ||
artisan | Class | Class source | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
docker-compose.yml | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
readme.md | Doc. | Documentation | ||
server.php | Aux. | Auxiliary script | ||
webpack.mix.js | Data | Auxiliary data |
Files (94) | / | app |
File | Role | Description | ||
---|---|---|---|---|
Console (1 file) | ||||
Elastic (1 file) | ||||
Exceptions (1 file) | ||||
Http (1 file, 2 directories) | ||||
Providers (6 files) | ||||
Post.php | Class | Class source | ||
User.php | Class | Class source | ||
Worker.php | Class | Class source |
Files (94) | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Controllers (4 files, 1 directory) | ||||
Middleware (5 files) | ||||
Kernel.php | Class | Class source |
Files (94) | / | app | / | Http | / | Controllers |
File | Role | Description | ||
---|---|---|---|---|
Auth (4 files) | ||||
Controller.php | Class | Class source | ||
HomeController.php | Class | Class source | ||
PostController.php | Class | Class source | ||
UserController.php | Class | Class source |
Files (94) | / | app | / | Http | / | Controllers | / | Auth |
File | Role | Description |
---|---|---|
ForgotPasswordController.php | Class | Class source |
LoginController.php | Class | Class source |
RegisterController.php | Class | Class source |
ResetPasswordController.php | Class | Class source |
Files (94) | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
EncryptCookies.php | Class | Class source |
RedirectIfAuthenticated.php | Class | Class source |
TrimStrings.php | Class | Class source |
TrustProxies.php | Class | Class source |
VerifyCsrfToken.php | Class | Class source |
Files (94) | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
BroadcastServiceProvider.php | Class | Class source |
ElasticServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
RouteServiceProvider.php | Class | Class source |
Files (94) | / | config |
File | Role | Description |
---|---|---|
app.php | Class | Class source |
auth.php | Class | Class source |
broadcasting.php | Aux. | Auxiliary script |
cache.php | Aux. | Auxiliary script |
database.php | Aux. | Auxiliary script |
filesystems.php | Aux. | Auxiliary script |
hashing.php | Aux. | Auxiliary script |
logging.php | Class | Class source |
mail.php | Aux. | Auxiliary script |
queue.php | Aux. | Auxiliary script |
services.php | Class | Class source |
session.php | Aux. | Auxiliary script |
view.php | Aux. | Auxiliary script |
Files (94) | / | database | / | factories |
File | Role | Description |
---|---|---|
PostFactory.php | Class | Class source |
UserFactory.php | Class | Class source |
Files (94) | / | database | / | migrations |
File | Role | Description |
---|---|---|
2014_10_12_000000_create_users_table.php | Class | Class source |
2014_10_12_100000_...rd_resets_table.php | Class | Class source |
2018_08_02_095452_create_posts_table.php | Class | Class source |
2018_08_07_090055_...e_workers_table.php | Class | Class source |
Files (94) | / | docker | / | nginx |
File | Role | Description |
---|---|---|
default.conf | Data | Auxiliary data |
nginx.conf | Data | Auxiliary data |
Files (94) | / | docker | / | php |
File | Role | Description |
---|---|---|
custom.ini | Data | Auxiliary data |
Dockerfile | Data | Auxiliary data |
Files (94) | / | public |
File | Role | Description | ||
---|---|---|---|---|
css (1 file) | ||||
js (1 file) | ||||
.htaccess | Data | Auxiliary data | ||
index.php | Class | Class source | ||
robots.txt | Doc. | Documentation | ||
web.config | Data | Auxiliary data |
Files (94) | / | resources |
Files (94) | / | resources | / | assets | / | js |
File | Role | Description | ||
---|---|---|---|---|
components (1 file) | ||||
app.js | Data | Auxiliary data | ||
bootstrap.js | Data | Auxiliary data |
Files (94) | / | resources | / | assets | / | js | / | components |
File | Role | Description |
---|---|---|
ExampleComponent.vue | Data | Auxiliary data |
Files (94) | / | resources | / | assets | / | sass |
File | Role | Description |
---|---|---|
app.scss | Data | Auxiliary data |
_variables.scss | Data | Auxiliary data |
Files (94) | / | resources | / | lang | / | en |
File | Role | Description |
---|---|---|
auth.php | Aux. | Auxiliary script |
pagination.php | Aux. | Auxiliary script |
passwords.php | Aux. | Auxiliary script |
validation.php | Aux. | Auxiliary script |
Files (94) | / | resources | / | views |
File | Role | Description | ||
---|---|---|---|---|
auth (2 files, 1 directory) | ||||
layouts (2 files) | ||||
posts (2 files) | ||||
home.blade.php | Aux. | Auxiliary script | ||
welcome.blade.php | Aux. | Auxiliary script |
Files (94) | / | resources | / | views | / | auth |
File | Role | Description | ||
---|---|---|---|---|
passwords (2 files) | ||||
login.blade.php | Aux. | Auxiliary script | ||
register.blade.php | Aux. | Auxiliary script |
Files (94) | / | resources | / | views | / | auth | / | passwords |
File | Role | Description |
---|---|---|
email.blade.php | Aux. | Auxiliary script |
reset.blade.php | Aux. | Auxiliary script |
Files (94) | / | resources | / | views | / | layouts |
File | Role | Description |
---|---|---|
app.blade.php | Aux. | Auxiliary script |
master.blade.php | Aux. | Auxiliary script |
Files (94) | / | resources | / | views | / | posts |
File | Role | Description |
---|---|---|
create.blade.php | Aux. | Auxiliary script |
index.blade.php | Aux. | Auxiliary script |
Files (94) | / | routes |
File | Role | Description |
---|---|---|
api.php | Example | Example script |
channels.php | Example | Example script |
console.php | Example | Example script |
web.php | Example | Example script |
Files (94) | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (1 file) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
TestCase.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
laravel-docker-elast-2022-04-26.zip 206KB | |
laravel-docker-elast-2022-04-26.tar.gz 181KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.