docker-popsu/Makefile
2021-05-10 21:16:45 +02:00

78 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
# export DATE_NOW
pull:
docker-compose pull
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)
downbuildup: down build up
up:
docker-compose up -d
ps:
docker-compose ps
logs:
docker-compose logs -f
d9_maj_config: d9_crd d9_composer_install d9_updb d9_cim d9_cr
d9_crd:
docker exec enfrancais_pgp_d9_1 /bin/bash -c "drush cache-clear drush"
d9_cr:
docker exec enfrancais_pgp_d9_1 /bin/bash -c "drush cr"
d9_updb:
docker exec enfrancais_pgp_d9_1 /bin/bash -c "drush updb -y"
d9_cim:
docker exec enfrancais_pgp_d9_1 /bin/bash -c "drush config-import -y"
d9_composer_install:
docker exec enfrancais_pgp_d9_1 /bin/bash -c "composer install --no-dev"
down:
docker-compose down
exec_nginx:
docker exec -it popsu_nginx_1 bash
exec_php_d7:
docker exec -it popsu_php_d7_1 bash
exec_php_d9:
docker exec -it popsu_php_d9_1 bash
exec_mysql_d7:
docker exec -it popsu_mysql_d7_1 bash
exec_mysql_d9:
docker exec -it popsu_mysql_d9_1 bash
dump_d7_db:
docker exec popsu_mysql_d7_1 sh -c 'exec mysqldump -uroot -ppopsu popsu_d7' > ./ressources/popsu_d7-$(DATE_NOW)-local.sql
dump_d9_db:
docker exec popsu_mysql_d9_1 sh -c 'exec mysqldump -uroot -ppopsu popsu_d9' > ./ressources/popsu_d9-$(DATE_NOW)-local.sql