-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (29 loc) · 855 Bytes
/
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
.DEFAULT_GOAL := start
APACHE_IP = $(shell docker inspect --format '{{ .NetworkSettings.Networks.docker_libertempo.IPAddress }}' lt-httpd)
PHP_APP_DIR = /srv/app
NOM_INSTANCE = libertempo
WEB_USER = www-data
clean:
docker system prune -f
docker container prune -f
docker image prune -f
docker volume prune -f
docker network prune -f
start:
docker-compose start
stop:
docker-compose stop
down:
docker-compose --compatibility down
set-env:
cp .env.dist .env
build:
docker-compose --compatibility up --build -d
rebuild: down build
ldap-add-user:
docker exec lt-ldap /opt/run/add_users_ldap.sh
install: start
@echo "Installation de l'application…"
@docker exec lt-php bash -c "echo '${APACHE_IP} ${NOM_INSTANCE}' >> /etc/hosts"
@echo "Please run make autoinstall..."
@docker exec -ti -w ${PHP_APP_DIR}/web -u ${WEB_USER} lt-php bash