Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
m-elewa committed May 30, 2020
2 parents a09d6f4 + ddac142 commit 292124b
Show file tree
Hide file tree
Showing 185 changed files with 70,213 additions and 106,910 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
/storage/scout-indexes/*.index
4 changes: 3 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[submodule "laradock"]
path = laradock
url = https://github.com/Laradock/laradock.git
url = https://github.com/m-elewa/laradock
branch = master
ignore = all
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",
"configurations": [
{
"log": true,
"name": "XDebug listening to Laradock",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/var/www": "${workspaceFolder}"
},
"ignore": [
"**/vendor/**/*.php"
]
}
]
}
9 changes: 9 additions & 0 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@servers(['localhost' => '127.0.0.1'])

@task('deploy', ['on' => 'localhost'])
git pull origin master
composer install
php artisan migrate:fresh --seed
npm install
npm run dev
@endtask
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-include .env
.PHONY: test seed setup bash up stop deploy exec

test-database: .env
@cd laradock && docker-compose exec mysql mysql -u$(DB_USERNAME) -p$(DB_PASSWORD) -e \
Expand All @@ -16,11 +17,29 @@ setup:
bash:
@cd laradock && docker-compose exec --user=laradock workspace bash

npm-watch:
@cd laradock && docker-compose exec --user=laradock workspace npm run watch

scout-import:
@cd laradock && docker-compose exec --user=laradock workspace php artisan scout:import App\\Job

scout-flush:
@cd laradock && docker-compose exec --user=laradock workspace php artisan scout:flush App\\Job

docker-up:
@cd laradock && docker-compose up -d nginx mysql phpmyadmin workspace portainer redis laravel-horizon laravel-echo-server
# run all containers
up:
@cd laradock && sudo docker-compose up -d --build --scale nginx=3

# stop all containers
down:
@cd laradock && docker-compose down

deploy:
@cd laradock && docker-compose exec --user=laradock workspace bash -c '~/.composer/vendor/bin/envoy run deploy'

# execute a command on the container
exec:
ifndef command
$(error command is required)
endif
@cd laradock && docker-compose exec --user=laradock workspace $(command)
34 changes: 15 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,33 @@ In order to use Freelancers Market, you will need:

## Installation

1. Clone the source code `git clone --recurse-submodules https://github.com/m-elewa/freelancers-market.git`
2. Enter the laradock folder and rename env-example to .env `cp env-example .env`
3. Make these changes to `.env`
```shell
### PHP Version ###########################################
PHP_VERSION=7.4
### WORKSPACE #############################################
WORKSPACE_VUE_CLI_SERVE_HOST_PORT=9090
```
4. Rename `laravel-horizon.conf.example` to `laravel-horizon.conf`
1. Install the project
```
cp laravel-horizon/supervisord.d/laravel-horizon.conf.example laravel-horizon/supervisord.d/laravel-horizon.conf
git clone --recurse-submodules https://github.com/m-elewa/freelancers-market.git \
&& cd freelancers-market \
&& git submodule update --remote \
&& cd laradock \
&& cp env-example .env
```
5. Run Docker Containers `make docker-up` or
2. Change `HOST_DOMAIN` and `ACME_EMAIL` in `.env` file to your website domain and email
3. Run Docker Containers with `make up` command from the root directory or from laradock directory run
```
docker-compose up -d nginx mysql phpmyadmin workspace portainer redis laravel-horizon laravel-echo-server
docker-compose up -d --build --scale nginx=3
```
6. To setup the application Run `make setup` or
4. Setup the application by running `make setup` from the root directory or from laradock directory run
```
docker-compose exec --user=laradock workspace composer setup
```
7. You can now login with `[email protected]` and password as `password` on `localhost`
You can now login with `[email protected]` and password as `password`

## Tips
- run `make test-database` to create `test` database for tests
- run `make test` to test the application
- run `make seed` to drop all tables then migrate and seed the database
- for Laravel Telescope go to `localhost/telescope`
- for Laravel Horizon go to `localhost/horizon`
- for Portainer go to `localhost:9010`
- for phpMyAdmin go to `localhost:8080`
- for Laravel Telescope go to `https//{YOURDOMAIN.COM}/telescope`
- for Laravel Horizon go to `https//{YOURDOMAIN.COM}/horizon`
- for Portainer go to `{YOURDOMAIN.COM}:9010`
- for phpMyAdmin go to `{YOURDOMAIN.COM}:8080`
- to enter the Workspace container run `make bash` or
```
docker-compose exec --user=laradock workspace bash
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TrustProxies extends Middleware
*
* @var array|string
*/
protected $proxies;
protected $proxies = '*';

/**
* The headers that should be used to detect proxies.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"webpatser/laravel-uuid": "^3.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.3",
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.4",
"laravel/ui": "^2.0",
Expand Down
Loading

0 comments on commit 292124b

Please sign in to comment.