Skip to content

Commit cc72881

Browse files
committed
Adds Sail/Docker documentation
1 parent d73f44a commit cc72881

File tree

3 files changed

+56
-28
lines changed

3 files changed

+56
-28
lines changed

.env.example

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,22 @@ APP_ENV=local
33
APP_KEY=
44
APP_DEBUG=true
55
APP_URL=http://localhost
6+
APP_PORT=80
67

78
LOG_CHANNEL=stack
8-
LOG_DEPRECATIONS_CHANNEL=null
99
LOG_LEVEL=debug
1010

1111
DB_CONNECTION=sqlite
12-
DB_FOREIGN_KEYS=true
12+
# DB_DATABASE=/var/www/html/database/database.sqlite
1313

1414
BROADCAST_DRIVER=log
1515
CACHE_DRIVER=file
1616
FILESYSTEM_DISK=local
1717
QUEUE_CONNECTION=sync
18-
SESSION_DRIVER=file
18+
SESSION_DRIVER=cookie
1919
SESSION_LIFETIME=120
2020

21-
MEMCACHED_HOST=127.0.0.1
22-
23-
REDIS_HOST=127.0.0.1
24-
REDIS_PASSWORD=null
25-
REDIS_PORT=6379
26-
21+
# Mail for development (Mailpit with Sail)
2722
MAIL_MAILER=smtp
2823
MAIL_HOST=mailpit
2924
MAIL_PORT=1025
@@ -33,23 +28,11 @@ MAIL_ENCRYPTION=null
3328
MAIL_FROM_ADDRESS="[email protected]"
3429
MAIL_FROM_NAME="${APP_NAME}"
3530

36-
AWS_ACCESS_KEY_ID=
37-
AWS_SECRET_ACCESS_KEY=
38-
AWS_DEFAULT_REGION=us-east-1
39-
AWS_BUCKET=
40-
AWS_USE_PATH_STYLE_ENDPOINT=false
41-
42-
PUSHER_APP_ID=
43-
PUSHER_APP_KEY=
44-
PUSHER_APP_SECRET=
45-
PUSHER_HOST=
46-
PUSHER_PORT=443
47-
PUSHER_SCHEME=https
48-
PUSHER_APP_CLUSTER=mt1
31+
# Laravel Sail
32+
WWWUSER=1000
33+
WWWGROUP=1000
4934

50-
VITE_APP_NAME="${APP_NAME}"
51-
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
52-
VITE_PUSHER_HOST="${PUSHER_HOST}"
53-
VITE_PUSHER_PORT="${PUSHER_PORT}"
54-
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
55-
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
35+
# Avoid Sail Warnings during build
36+
DB_USERNAME=
37+
DB_PASSWORD=
38+
MYSQL_EXTRA_OPTIONS=

DOCKER-SAIL.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# DOCKER/SAIL SETUP
2+
3+
# Clone the project
4+
5+
git clone https://github.com/daniel-cintra/modular-demo.git && cd modular-demo
6+
7+
# Create the .env file
8+
9+
mv .env.example .env
10+
11+
# Install the dependencies
12+
13+
docker run --rm \
14+
-u "$(id -u):$(id -g)" \
15+
-v "$(pwd):/var/www/html" \
16+
-w /var/www/html \
17+
laravelsail/php84-composer:latest \
18+
composer install
19+
20+
# Sail scaffolding install
21+
22+
docker run --rm \
23+
-u "$(id -u):$(id -g)" \
24+
-v "$(pwd):/var/www/html" \
25+
-w /var/www/html \
26+
laravelsail/php84-composer:latest \
27+
php artisan sail:install
28+
29+
# Start sail
30+
31+
./vendor/bin/sail up -d
32+
33+
# SSH into the container
34+
35+
./vendor/bin/sail shell
36+
37+
# Follow the install instructions normally
38+
39+
Logged in the container, as mentioned in the previous step. Follow the [installation instructions](/README.md) normally, starting at the step `php artisan key:generate`.
40+
41+
# verificar necessidade
42+
43+
chmod 664 /var/www/html/database/database.sqlite

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ And the Blog Demo PreviewApp at [https://demo.ismodular.com/blog](https://demo.i
3434

3535
## Installation
3636

37+
If you want to use Docker/Sail, please follow the [installation instructions](/DOCKER-SAIL.md) first. Otherwise, follow the instructions below.
38+
3739
Clone the repo locally:
3840

3941
```sh

0 commit comments

Comments
 (0)