diff --git a/.env.example b/.env.example index 078be78..37f90b4 100644 --- a/.env.example +++ b/.env.example @@ -1,32 +1,32 @@ -APP_NAME=Laravel +APP_NAME=FooBar APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost -SOCKET_ENDPOINT=http://localhost +SOCKET_ENDPOINT=http://localhost:4000 LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 +DB_CONNECTION=pgsql +DB_HOST=pgsql +DB_PORT=5432 DB_DATABASE=new_app -DB_USERNAME=root -DB_PASSWORD= +DB_USERNAME=sail +DB_PASSWORD=password BROADCAST_DRIVER=log CACHE_DRIVER=file FILESYSTEM_DRIVER=local QUEUE_CONNECTION=sync -SESSION_DRIVER=database +SESSION_DRIVER=redis SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 -REDIS_HOST=127.0.0.1 +REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379 REDIS_PREFIX= diff --git a/README.md b/README.md index c2d411d..4d07d23 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,25 @@ This is how the idea of FooBar.Live was born. It emerged as an attempt to solve FooBar.Tv is completely dockerized. It is possible to run the project without Docker, but it is not recommended because of the effort that it will take. -### Install With Docker +### Install With Docker - Automatic + +There is a file in the project called [`setup.sh`](setup.sh), it is basically a shell script that runs the necessary commands for installation. + +If you don't want to run a shell script directly, you can follow the steps at (#install-with-docker---manual)[Install With Docker - Manual]. + +```bash +# Clone this repository +$ git clone https://github.com/emincanozcan/foobar.live + +# Go into the repository +$ cd foobar.live + +# Run the script +$ chmox +x ./setup.sh && ./setup.sh +``` + + +### Install With Docker - Manual ```bash # Clone this repository @@ -38,7 +56,7 @@ $ cd foobar.live $ cp .env.example .env # Install PHP dependencies using a docker container -$ docker run --rm --interactive --tty volume $PWD:/app composer install +$ docker run --rm --interactive --tty --volume $PWD:/app composer install # Run the containers $ ./vendor/bin/sail up -d @@ -77,3 +95,7 @@ If you have interest, you can take a look [FFmpeg Streaming Guide](https://trac. $ ffmpeg -re -i videofilepath.mp4 -vcodec libx264 -vprofile baseline -g 30 -acodec aac -strict -2 -f flv rtmp://localhost:1935/stream_receiver/$STREAM_KEY ``` + +## License + +The MIT License (MIT). Please see [License File](LICENSE.md) for more information. diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..1440fca --- /dev/null +++ b/setup.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +cp .env.example .env + +docker run --rm --interactive --tty --volume $PWD:/app composer install + +./vendor/bin/sail up -d + +./vendor/bin/sail artisan key:generate && ./vendor/bin/sail artisan storage:link && ./vendor/bin/sail artisan migrate --seed