Skip to content

Commit cab1212

Browse files
committed
10. fix local deployment
1 parent c84e595 commit cab1212

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

src/.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ LOG_STACK=single
1919
LOG_DEPRECATIONS_CHANNEL=null
2020
LOG_LEVEL=debug
2121

22-
DB_CONNECTION=sqlite
23-
# DB_HOST=127.0.0.1
24-
# DB_PORT=3306
25-
# DB_DATABASE=laravel
26-
# DB_USERNAME=root
27-
# DB_PASSWORD=
22+
DB_CONNECTION=mysql
23+
DB_HOST=mysql
24+
DB_PORT=3306
25+
DB_DATABASE=app
26+
DB_USERNAME=login
27+
DB_PASSWORD=pass
2828

2929
MS_DRIVER=array
3030
MS_DB_CONNECTION=sqlsrv

src/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
IGNITION_LOCAL_SITES_PATH: '${PWD}'
2020
volumes:
2121
- '.:/var/www/html'
22-
- ../.dep:/var/www/.dep:ro
22+
- '../.dep:/var/www/.dep:ro'
2323
networks:
2424
- sail
2525
depends_on:

up

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ cd ./src/
55
chmod -R 777 storage
66
chmod -R 777 bootstrap/cache
77

8+
if ! [ -f ".env" ]; then
9+
cp .env.example .env
10+
fi
11+
812
if ! [ -d "vendor" ]; then
913
docker run --rm \
1014
-u "$(id -u):$(id -g)" \
1115
-v "$(pwd):/var/www/html" \
1216
-w /var/www/html \
13-
laravelsail/php81-composer:latest \
17+
laravelsail/php83-composer:latest \
1418
composer install --ignore-platform-reqs --no-cache
1519
fi
1620

1721
# Path to the shell configuration file (replace with your path if necessary)
1822
CONFIG_FILE="$HOME/.bashrc"
1923
# Alias command to be added
20-
ALIAS_COMMAND="alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'"
24+
ALIAS_COMMAND="alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'"
2125
# Check if the alias already exists in the configuration file
2226
if ! grep -Fq "$ALIAS_COMMAND" "$CONFIG_FILE"; then
2327
# If not, add it to the end of the file
@@ -30,20 +34,20 @@ else
3034
echo "Alias already exists in $CONFIG_FILE"
3135
fi
3236

37+
# ?
38+
# sail down -v
39+
# sail build --no-cache
40+
# sail artisan sail:install
3341
sail up -d
3442

35-
if ! [ -f ".env" ]; then
36-
cp .env.example .env
37-
fi
38-
39-
if ! [ -d "node_modules" ]; then
40-
sail npm install --no-optional
41-
sail npm run dev
42-
fi
43-
4443
sail artisan migrate
4544
sail artisan job:dispatch SxGeoUpdateJob
4645
sail artisan storage:link
4746
sail artisan cache:clear
4847
sail artisan config:clear
4948
sail artisan route:clear
49+
50+
if ! [ -d "node_modules" ]; then
51+
sail npm install --no-optional
52+
sail npm run dev
53+
fi

0 commit comments

Comments
 (0)