-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (36 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
up:
docker-compose up -d app web db
down:
docker-compose down
# Init application after start docker
app-init:
docker-compose exec app ash -c ' \
chmod -R 777 /app/storage && \
composer install && \
php artisan storage:link && \
php artisan key:generate'
# Clear laravel cache and optimize
app-clear:
docker-compose exec app composer dump-autoload
docker-compose exec app php artisan optimize:clear
# Refresh database
app-db-fresh:
docker-compose exec app ash -c ' \
php artisan migrate:fresh && \
php artisan migrate:fresh --env=testing'
# Refresh database and seeding except testing database
app-db-fresh-seed:
docker-compose exec app ash -c ' \
php artisan migrate:fresh --seed && \
php artisan migrate:fresh --env=testing'
# Sync vendor directory from docker container to local
app-sync-vendor:
mkdir -p ./src/vendor
docker cp `docker-compose ps -q app`:/app/vendor/. ./src/vendor
# IDE helper
app-ide-helper:
docker-compose exec app ash -c ' \
php artisan ide-helper:eloquent && \
php artisan ide-helper:models --nowrite && \
php artisan ide-helper:generate && \
php artisan ide-helper:meta'