2023-11-19 11:36:05 +01:00
|
|
|
#!/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)
|
|
|
|
|
2024-10-23 22:28:39 +02:00
|
|
|
buildnc_mysql:
|
|
|
|
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) mysql
|
|
|
|
|
2023-11-19 11:36:05 +01:00
|
|
|
downbuildup: down build up
|
|
|
|
|
|
|
|
up:
|
|
|
|
docker-compose up -d
|
|
|
|
|
|
|
|
ps:
|
|
|
|
docker-compose ps
|
|
|
|
|
|
|
|
logs:
|
|
|
|
docker-compose logs -f
|
|
|
|
|
2023-11-19 12:07:28 +01:00
|
|
|
maj_config: crd composer_install updb cim cr pag #dev.phpmyadmin.erable.fr
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
crd:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-php-1 /bin/bash -c "drush cache-clear drush"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
composer_install:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-php-1 /bin/bash -c "composer install --no-dev"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
updb:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-php-1 /bin/bash -c "drush updb -y"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
cim:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-php-1 /bin/bash -c "drush config-import -y"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
# sync_struct:
|
2023-11-19 12:07:28 +01:00
|
|
|
# docker exec erable-php-1 /bin/bash -c "drush im --choice safe && drush ib --choice full"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
cr:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-php-1 /bin/bash -c "drush cr"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
pag:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-php-1 /bin/bash -c "drush pag all canonical_entities:node && drush pag all canonical_entities:taxonomy_term"
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
restart_nginx:
|
|
|
|
docker-compose restart nginx
|
|
|
|
|
|
|
|
restart_php:
|
|
|
|
docker-compose restart php
|
|
|
|
|
|
|
|
down:
|
|
|
|
docker-compose down
|
|
|
|
|
|
|
|
exec_nginx:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec -it erable-nginx-1 bash
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
exec_php:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec -it erable-php-1 bash
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
exec_mysql:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec -it erable-mysql-1 bash
|
2023-11-19 11:36:05 +01:00
|
|
|
|
|
|
|
dump_db:
|
2023-11-19 12:07:28 +01:00
|
|
|
docker exec erable-mysql-1 sh -c 'exec mysqldump -uroot -perable erable' > ./ressources/erable-$(DATE_NOW)-local.sql
|