forked from devict/votelocal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.23 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
.PHONY: prod-setup
prod-setup: deps build app-key db-migrate
.PHONY: dev-setup
dev-setup: prod-setup db-seed
# Runs client in watch mode, and ngrok for local tunneling.
.PHONY: dev
dev:
docker-compose up client caddy php-fpm db ngrok
.PHONY: logs
logs:
tail -f storage/logs/laravel.log
# Runs the client build command first, then runs only prod required docker containers.
.PHONY: prod
prod:
docker-compose run --rm client npm run prod
docker-compose up -d caddy php-fpm db
.PHONY: test
test:
docker-compose run --rm php vendor/bin/phpunit
.PHONY: deps
deps:
docker run --rm -v ${PWD}:/app composer install
.PHONY: build
build:
docker-compose build
.PHONY: mysql
mysql:
docker-compose run --rm db mysql --host=db --user=votelocal --password votelocal
.PHONY: db-migrate
db-migrate:
docker-compose run --rm php php artisan migrate
.PHONY: db-seed
db-seed:
docker-compose run --rm php php artisan db:seed
.PHONY: app-key
app-key:
docker-compose run --rm php php artisan key:generate
.PHONY: docker-process-messages
docker-process-messages:
docker-compose run --rm php php artisan schedule:run
.PHONY: docker-mysql
docker-mysql:
docker run --network=votelocal_default -it --rm mysql mysql -hdb -uroot --password=supersecret votelocal