70 lines
1.8 KiB
Makefile
70 lines
1.8 KiB
Makefile
#!/usr/bin/make
|
|
|
|
SHELL = /bin/sh
|
|
|
|
USER_UID := $(shell id -u)
|
|
USER_UNAME := $(shell id -un)
|
|
USER_GID := $(shell id -g)
|
|
USER_GNAME := $(shell id -gn)
|
|
|
|
DATE_NOW := $(shell date '+%Y-%m-%d_%H%M%S')
|
|
|
|
export USER_UID
|
|
export USER_UNAME
|
|
export USER_GID
|
|
export USER_GNAME
|
|
|
|
build:
|
|
docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
|
|
|
|
buildnc:
|
|
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
|
|
|
|
buildncnginx:
|
|
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) nginx
|
|
|
|
buildncnginx_static:
|
|
docker-compose -f docker-compose-static.yml build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) nginx_static
|
|
|
|
up:
|
|
docker-compose up -d
|
|
|
|
up_static:
|
|
docker-compose -f docker-compose-static.yml up -d
|
|
|
|
down_static:
|
|
docker-compose -f docker-compose-static.yml down
|
|
|
|
|
|
restart_nginx:
|
|
docker-compose restart nginx
|
|
|
|
restart_nginx_static:
|
|
docker-compose -f docker-compose-static.yml restart nginx_static
|
|
|
|
# upbuild:
|
|
# docker-compose up -d --build
|
|
|
|
ps:
|
|
docker-compose ps
|
|
|
|
logs:
|
|
docker-compose logs -f
|
|
|
|
down:
|
|
docker-compose down
|
|
|
|
exec_phpd7:
|
|
docker exec -it jeunesetengages-phpd7-1 bash
|
|
|
|
exec_mysqld7:
|
|
docker exec -it jeunesetengages-mysqld7-1 bash
|
|
|
|
exec_nginx:
|
|
docker exec -it jeunesetengages-nginx-1 bash
|
|
exec_npm:
|
|
docker exec -it jeunesetengages-npm-1 sh
|
|
|
|
dump_d7_db:
|
|
docker exec jeunesetengages-mysqld7-1 sh -c 'exec mysqldump -uroot -pjeunesetengages jeunesetengages' > ./ressources/jeunesetengages_d7-$(DATE_NOW)-local.sql
|