From 3f5314cd661281dbaff502a702df639844d6fb59 Mon Sep 17 00:00:00 2001 From: Saleem Hadad Date: Sun, 16 Jan 2022 15:31:28 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20install=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 +- .env.sail.example | 53 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 23 ++++++++++++++------ 3 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 .env.sail.example diff --git a/.env.example b/.env.example index 16442a2..7fa7992 100644 --- a/.env.example +++ b/.env.example @@ -13,7 +13,7 @@ DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=finance DB_USERNAME=root -DB_PASSWORD= +DB_PASSWORD=root BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/.env.sail.example b/.env.sail.example new file mode 100644 index 0000000..caa83b5 --- /dev/null +++ b/.env.sail.example @@ -0,0 +1,53 @@ +APP_NAME=FINANCE +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=mysql +DB_PORT=3306 +DB_DATABASE=finance +DB_USERNAME=sail +DB_PASSWORD=password + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DRIVER=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS=null +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" +GRAPHQL_PLAYGROUND_ENABLED=false \ No newline at end of file diff --git a/README.md b/README.md index 6fe2d12..d69cb31 100644 --- a/README.md +++ b/README.md @@ -25,17 +25,24 @@ Try the app with [live demo](https://finance-demo.saleem.dev/). > Docker Installation ```bash -# step 0: clone the app git clone https://github.com/saleem-hadad/finance && cd finance -# step 1: run migration +docker run --rm \ + -u "$(id -u):$(id -g)" \ + -v $(pwd):/var/www/html \ + -w /var/www/html \ + laravelsail/php81-composer:latest \ + composer install --ignore-platform-reqs + +cp .env.sail.example .env + +./vendor/bin/sail up -d + +./vendor/bin/sail artisan key:generate + ./vendor/bin/sail artisan migrate -# step 2: install command ./vendor/bin/sail artisan finance:install - -# step 3: serve the app -./vendor/bin/sail up ``` Once done, visit the app on `http://localhost` @@ -49,6 +56,10 @@ If you wish installing the app using normal Laravel environment, make sure you h # step 0: clone the app git clone https://github.com/saleem-hadad/finance && cd finance +cp .env.example .env + +php artisan key:generate + # step 1: install deps composer install