forked from Attendize/Attendize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.57 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
# Commonly used commands, compatible with Linux type shells
# build the docker images for any environment
build:
docker build --tag attendize_base --target base .
docker build --tag attendize_worker --target worker --cache-from attendize_base:latest .
docker build --tag attendize_web --target web --cache-from attendize_worker:latest .
build-apache:
docker build --tag attendize_base --target base --file Dockerfile-apache .
docker build --tag attendize_worker --target worker --cache-from attendize_base:latest --file Dockerfile-apache .
docker build --tag attendize_web --target web --cache-from attendize_worker:latest --file Dockerfile-apache .
################
# The following commands are for local development use only and won't work in a production environment
################
# set up docker images and run containers for local development with docker-compose only
setup: build
cp .env.example .env
docker-compose up -d
docker-compose exec web ./scripts/setup
open https://localhost:8081/install
docker-compose exec web tail -f /var/log/nginx/access.log /var/log/nginx/error.log /var/log/php-fpm.log storage/logs/*
# run the whole stack and open up the app in the browser
run:
docker-compose up -d
open https://localhost:8081/
# open a bash prompt on a running web container
shell:
docker-compose exec web /bin/bash
# run the unit tests on a running web container
test:
docker-compose exec web bash -c "touch database/database.sqlite && vendor/bin/phpunit"
# clear all laravel caches on a running web container
cache:
docker-compose exec web php artisan optimize:clear