Skip to content

Commit

Permalink
chore: configure bin scripts for sail
Browse files Browse the repository at this point in the history
  • Loading branch information
otaaaviio committed Jun 21, 2024
1 parent 7ec8cde commit aa5e2f2
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_NAME=Laravel
APP_NAME=DiscordClone
APP_ENV=local
APP_KEY=
APP_KEY=base64:/6RMPYzR0XkBwFxkp8592fYoHey8Y+t9uUnucYF/pls=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost
Expand All @@ -20,21 +20,21 @@ LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_HOST=db-disc
DB_PORT=5432
DB_DATABASE=disc_laravel
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=postgres
DB_USERNAME=postgres
DB_PASSWORD=password

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
BROADCAST_CONNECTION=reverb
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
QUEUE_CONNECTION=sync

CACHE_STORE=database
CACHE_PREFIX=
Expand Down Expand Up @@ -62,3 +62,17 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"

L5_SWAGGER_CONST_HOST=http://project.test/api/v1

REVERB_APP_ID=857122
REVERB_APP_KEY=aruy2ffutpiuu41wo0jw
REVERB_APP_SECRET=kwc44mjgtuh2qbje7gy0
REVERB_HOST="localhost"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
26 changes: 26 additions & 0 deletions bin/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
echo 'copying .env.example to .env...'
cp .env.example .env

echo 'installing Composer dependencies within Docker container...'
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
--env-file .env \
laravelsail/php83-composer:latest \
composer install --ignore-platform-reqs

echo 'building Docker containers...'
./vendor/bin/sail build --no-cache

echo 'running sail up...'
./vendor/bin/sail up -d

echo 'generating application key...'
./vendor/bin/sail art key:generate

echo 'migrating database and seeding...'
./vendor/bin/sail art migrate --seed

echo 'initializing reverb'
./vendor/bin/sail art reverb:start
5 changes: 5 additions & 0 deletions bin/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo 'running sail up...'
./vendor/bin/sail up -d

echo 'initializing reverb'
./vendor/bin/sail art reverb:start
1 change: 1 addition & 0 deletions bin/stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./vendor/bin/sail stop

0 comments on commit aa5e2f2

Please sign in to comment.