-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
73 lines (57 loc) · 1.92 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# defines variables
PERMISSIONS_WEBAPI ?= make webapi-permissions
PERMISSIONS_WEBAPP ?= make webapp-permissions
MYSQL_PASSWORD ?= root
#include Make.config
install:
cp webapi/src/.env.example webapi/src/.env
docker compose build --no-cache
docker compose up -d
docker compose exec webapi composer update -vvv
docker compose exec composer require mongodb/laravel-mongodb ^4.0.0
mysql:
docker compose exec db mysql -u root -p$(MYSQL_PASSWORD)
run:
docker compose up -d
docker compose exec webapp npm start
stop:
docker compose down
test:
docker compose exec webapi php artisan test
show-logs:
echo "Showing logs...... \n " && tail -f src/storage/logs/laravel.log
permissions:
$ echo "Running permissions"
$(PERMISSIONS_WEBAPI)
$(PERMISSIONS_WEBAPP)
webapi-permissions:
sudo find webapi/src/ -type d -exec chmod 775 {} \;
sudo find webapi/src/ -type f -exec chmod 664 {} \;
sudo chown -R www-data:${USER} webapi/src
sudo find webapi/src/bootstrap/cache -type d -exec chmod 775 {} \;
sudo find webapi/src/bootstrap/cache -type f -exec chmod 664 {} \;
sudo chown -R www-data:${USER} webapi/src/bootstrap/cache
webapp-permissions:
$ echo 'Running webapp permissions'\;
sudo find webapp/src/src/ -type d -exec chmod 775 {} \;
sudo find webapp/src/src/ -type f -exec chmod 664 {} \;
sudo chown -R root:${USER} webapp/src/src/
sudo find webapp/src/public/ -type d -exec chmod 775 {} \;
sudo find webapp/src/public/ -type f -exec chmod 664 {} \;
sudo chown -R root:${USER} webapp/src/public/
webapi-bash:
docker compose exec webapi bash
webapp-bash:
docker compose exec webapp /bin/ash
artisan:
docker compose exec webapi php artisan
seed:
cp ./stocks.sql webapi/src/public/
docker compose exec webapi php artisan db:seed --class=StockSeeder
rm webapi/src/public/stocks.sql
make npm:
docker compose exec webapp npm
make npm-build:
docker compose exec webapp npm run build
make npm-start:
docker compose exec webapp npm start