-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (33 loc) · 1.33 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
.PHONY: build up setup down clear setup-env
build:
@docker-compose build --no-cache --force-rm
up:
@docker-compose up -d
setup:
@docker exec -it signnow-sample-app composer install --ignore-platform-reqs --no-dev
@test -f .env || cp .env.src .env
@docker exec -it signnow-sample-app php artisan key:generate
@make setup-env
down:
@docker-compose down -v
clear:
@docker exec -it signnow-sample-app php artisan cache:clear
@docker exec -it signnow-sample-app php artisan config:clear
@docker exec -it signnow-sample-app php artisan route:clear
@docker exec -it signnow-sample-app php artisan view:clear
@docker exec -it signnow-sample-app php artisan optimize:clear
setup-env:
@echo "\nPlease configure your sample application with required information:"; \
read -p "signNow API host: " sn_api_host; \
read -p "signNow application's basic token: " sn_basic_token; \
read -p "Your signer's email: " sn_signer_emal; \
read -p "Your login to signNow account: " sn_user; \
read -p "Your password to signNow account: " sn_password; \
echo "\n" >> .env; \
echo "SN_API_HOST=$$sn_api_host" >> .env; \
echo "SN_API_BASIC_TOKEN=$$sn_basic_token" >> .env; \
echo "SN_API_USER=$$sn_user" >> .env; \
echo "SN_API_PASSWORD=$$sn_password" >> .env; \
echo "SN_SIGNER_EMAIL=$$sn_signer_emal" >> .env; \
echo "\n" >> .env; \
echo "Setup completed."